This Is How SSL Certificates Work: HTTPS Explained in 15 Minutes

Featured Imgs 23

The world of online security may seem complex, but understanding the basics of how SSL certificates work and why HTTPS is essential can empower you to make safer choices online. Just like Jane, you can navigate the digital landscape with confidence, knowing that your data is protected from prying eyes. So next time you browse the web, remember the story of Jane and the coffee shop hacker and choose secure, trusted websites for your online activities. Let’s start our day with Jane who was enjoying her coffee peacefully.

Chapter 1: The Coffee Shop Conundrum

It was a sunny afternoon, and Jane decided to take a break from her hectic day. She headed to her favorite coffee shop, ordered a latte, and found a cozy corner to catch up on some online shopping and emails. As she settled in, she connected her laptop to the coffee shop’s free Wi-Fi and began browsing. Little did she know, a hacker named Bob was sitting just a few tables away, eager to intercept her data.

Chris’ Corner: Incremental Adoption

Fotolia Subscription Monthly 4685447 Xl Stock

One of the reasons I can’t stop thinking about native Web Components is how you can use them anywhere. “Incremental adoption” is the fancy phrase, I suppose.

We’ve even started using them on the new editor for CodePen we’re still hard at work on to solve some interesting issues I’m sure we’ll talk about someday. We’re using React/Next there, which isn’t famous for it’s support of Web Components, but it’s mostly been fine. Other JavaScript frameworks are much more friendly, and of course if you aren’t using a JavaScript framework you haven’t a care in the world; Web Components can be part of your world.

Because they are pretty easy to slip in anywhere, they work pretty well on CodePen. I mentioned a list of “stand alone” Web Components the other week here at the ol’ Corner, then I converted them into Pens just to prove that. A lot of web components are published to npm to using a site like esm.sh makes linking up the resources pretty easy.

What’s cool about using web components like I have above is that they just might last forever. I ranted a little about this on Mastodon the other day. The fewer dependencies a web component has, the longer it will last. It will certainly outlive your JavaScript framework, as Jake Lazaroff put it:

If we want our work to be accessible in five or ten or even 20 years, we need to use the web with no layers in between. For all its warts, the web has become the most resilient, portable, future-proof computing platform we’ve ever created — at least, if we build with that in mind.

I think that’s cool.

I makes me think what will break about those demos I posted. Like, what is going to make this Pen stop working someday? If CodePen goes offline, it will. But we’ve just had our 12th birthday are are going strong. You’d have to fight me to the death for that to happen. The web component is linked up from esm.sh so if that went down it would stop working. That’s definitely possible, we’ve seen free CDN-like websites like this come and go. But you could just change to a different one. The code is on npm, so that could die or the author could pull it down. But there doesn’t seem to be a lot of risk of that, and it’s open source so mirrors will exist. Pretty resilient, I’d say! Although different projects have different needs there and you could always get stronger by reducing even those dependencies.

Oh hey speaking of web components and things that are super cool… check out David Darnes new one just for us: <code-pen>.

The idea is that it’s a convienient way to use our Post to Prefill API. So you’d author code like this:

<script type="module" src="code-pen.js"></script>

<code-pen>
  <pre>
    <code>&lt;p&gt;Hello world&lt;/p&gt;</code>
  </pre>
  <pre>
    <code>:root { color: hotpink; }</code>
  </pre>
  <pre>
    <code>document.querySelector(&quot;p&quot;).style.backgroundColor = &quot;orange&quot;;</code>
  </pre>
</code-pen>

(Or you could use Markdown triple backticks and avoid the code escaping, among other options)

Then it builds an “Open in CodePen” button that users can click to open that code in a real Pen. The point is usually stuff like documentation and blog posts where you want to manage all the code yourself, not maintain both the text and the Pens separately. Thanks David, this is super cool.

David also recently published a free eBook called The Case for Web Components you might want to check out if you’re looking to be further convinced or need more learnings on the basic to decide. In it, he mentioned the use case of “design systems”, which seems like an awful big one to me. These days, if you’re creating a design system, doing it in anything other than web components seems weird. Web components will last and be movable between frameworks as your project evolves, with little if any downside.

While we’re on the subject let’s just get a little more into the weeds.

Ultimately a Web Component is a class in JavaScript. It has standard methods, like a constructor that is called when the class is instantiated. It also has a method connectedCallback that runs when on each instance of a web component when it shows up in the DOM. This is a bit of a subtle difference and can be quite a gotcha, as Nolan Lawson says. If your component needs to do stuff that might be unique to each instance, that belongs in connectedCallback. I think it’s a real superpower of web components! For example, it’s kinda like getting event delegation for free.

There is an approach to web components called HTML web components which is essentially:

  1. Take some perfectly acceptable HTML
  2. Wrap it in a <web-component> to extend the functionality

That’s fun and obviously useful (e.g. a blog post with a web component would render fine over RSS). It’s related but not quite the same declarative shadow DOM. Raymond Camden explores something interesting here… how does a web component know if the HTML inside it changes? Unfortunately there is no obvious solution or helper API for this… other than the platform itself. The trick is that you use a MutationObserver on itself internally to watch for changes and then do whatever you gotta do. Interesting stuff. I’d be tempted to rip the whole thing out of the DOM and replace it just so connectedCallback does it’s thing, rather than craft every web component such that it’s watching for it’s own changes.

I hadn’t really thought that much about watching for changes like that before, as it just hasn’t come up for me. Similarly, Ben Nadel points out that the contents of a <template> can be mutated at any time, and new components instantiated off it will use that new content. That makes sense to me, it’s just a twist of how I normally think of components. I think of the template as this static thing which takes data and does what it needs to do. Less so do I think of a template itself that is dynamic based on data.

Useful Customer Journey Maps (+ Figma & Miro Templates)

Fotolia Subscription Monthly 4685447 Xl Stock

User journey maps are a remarkably effective way to visualize the user’s experience for the entire team. Instead of pointing to documents scattered across remote fringes of Sharepoint, we bring key insights together — in one single place.

Let’s explore a couple of helpful customer journey templates to get started and how companies use them in practice.

This article is part of our ongoing series on UX. You might want to take a look at Smart Interface Design Patterns 🍣 and the upcoming live UX training as well. Use code BIRDIE to save 15% off.

AirBnB Customer Journey Blueprint

AirBnB Customer Journey Blueprint (also check Google Drive example) is a wonderful practical example of how to visualize the entire customer experience for two personas, across eight touch points, with user policies, UI screens and all interactions with the customer service — all on one single page.

Now, unlike AirBnB, your product might not need a mapping against user policies. However, it might need other lanes that would be more relevant for your team. For example, include relevant findings and recommendations from UX research. List key actions needed for the next stage. Include relevant UX metrics and unsuccessful touchpoints.

Whatever works for you, works for you — just make sure to avoid assumptions and refer to facts and insights from research.

Spotify Customer Journey Map

Spotify Customer Journey Blueprint (high resolution) breaks down customer experiences by distinct user profiles, and for each includes mobile and desktop views, pain points, thoughts, and actions. Also, notice branches for customers who skip authentication or admin tasks.

Getting Started With Journey Maps

To get started with user journey maps, we first choose a lens: Are we reflecting the current state or projecting a future state? Then, we choose a customer who experiences the journey — and we capture the situation/goals that they are focusing on.

Next, we list high-level actions users are going through. We start by defining the first and last stages and fill in between. Don’t get too granular: list key actions needed for the next stage. Add the user’s thoughts, feelings, sentiments, and emotional curves.

Eventually, add user’s key touchpoints with people, services, tools. Map user journey across mobile and desktop screens. Transfer insights from other research (e.g., customer support). Fill in stage after stage until the entire map is complete.

Then, identify pain points and highlight them with red dots. Add relevant jobs-to-be-done, metrics, channels if needed. Attach links to quotes, photos, videos, prototypes, Figma files. Finally, explore ideas and opportunities to address pain points.

Free Customer Journey Maps Templates (Miro, Figma)

You don’t have to reinvent the wheel from scratch. Below, you will find a few useful starter kits to get up and running fast. However, please make sure to customize these templates for your needs, as every product will require its own specific details, dependencies, and decisions.

Wrapping Up

Keep in mind that customer journeys are often non-linear, with unpredictable entry points and integrations way beyond the final stage of a customer journey map. It’s in those moments when things leave a perfect path that a product’s UX is actually stress-tested.

So consider mapping unsuccessful touchpoints as well — failures, error messages, conflicts, incompatibilities, warnings, connectivity issues, eventual lock-outs and frequent log-outs, authentication issues, outages, and urgent support inquiries.

Also, make sure to question assumptions and biases early. Once they live in your UX map, they grow roots — and it might not take long until they are seen as the foundation of everything, which can be remarkably difficult to challenge or question later. Good luck, everyone!

Meet Smart Interface Design Patterns

If you are interested in UX and design patterns, take a look at Smart Interface Design Patterns, our 10h-video course with 100s of practical examples from real-life projects — with a live UX training later this year. Everything from mega-dropdowns to complex enterprise tables — with 5 new segments added every year. Jump to a free preview. Use code BIRDIE to save 15% off.

Meet Smart Interface Design Patterns, our video course on interface design & UX.

100 design patterns & real-life examples.
10h-video course + live UX training. Free preview.

Best Free Shopify Templates That Will Elevate Your E-Commerce Store

Featured Imgs 23

Kickstarting an e-commerce store can feel like trying to build a castle out of LEGO blocks without a manual. Whether you’re a seasoned entrepreneur or a novice, the journey is riddled with choices, among which selecting the right theme tops the list. Fear not, the world of Shopify is a goldmine brimming with dazzling yet completely free themes. They can make your store look like a million bucks, even if you’re still waiting for your first sale.

Think of free Shopify themes as your store’s virtual wardrobe – you wouldn’t dress your shop in pajamas, right? With countless options at your fingertips, it’s as if you have an online stylist at your service. These templates bring style and functionality without the hefty price tag. Plus, they’re an absolute cinch to install.

Ready to dive into the slick, stylish, and snazzy world of Shopify themes? Buckle up, because we’ve got the lowdown on the best free templates to make your site shine brighter than a disco ball at Studio 54.

Why do you need a custom Shopify theme?

Imagine walking into a grocery store where aisles twist like a labyrinth and bananas are shelved next to light bulbs. Chaos, right? That’s what a default Shopify theme can feel like. A custom theme transforms your store from that chaotic mess into a seamless shopping experience – think IKEA without the frustration.

It’s not just about looks, though you’ll definitely turn heads with a snazzy setup. A tailored theme aligns with your brand’s vibe, making customers feel right at home, like they’re visiting a favorite café. Plus, you get to flaunt unique features that can boost sales quicker than a cat video goes viral.

In the crowded market, standing out isn’t optional; it’s survival. So, treat your store like that Instagram-perfect coffee shop. The right theme sets the stage for delightful discoveries and ensures your customers keep coming back for more lattes – and purchases.

The Significance of a Quality Shopify Theme

Imagine your Shopify store as a superhero; its theme is the cape. A quality theme doesn’t just swoosh dramatically—it gets things done. Flashy looks? Absolutely. But more importantly, it makes shopping a breeze. Think of it as offering an all-access pass to your products without the annoying velvet ropes.

Why settle for a default when you can go deluxe? A high-caliber theme means faster load times. Shoppers are like goldfish—easily distracted. Keep ’em hooked with a snappy interface.

Responsiveness? That’s non-negotiable. Your theme needs to look sharp on any device, just like you in your LinkedIn profile pic. Don’t forget SEO-friendly designs. Your store should be a magnet for search engines, pulling in customers like free samples at Costco.

In short, a quality Shopify theme is your behind-the-scenes co-star, ensuring every visitor has an unforgettable, purchase-inducing experience.💰

How to pick the best Shopify theme for your store?

Ready to supercharge your Shopify store with an epic theme but overwhelmed by the sea of options? No sweat, you’re not alone. Start with your vibe. Are you selling high-end fashion or quirky handmade crafts? Your theme should scream your brand’s personality louder than a teenager at a concert.

Next, check the functionality. Test drive those demos like you’re at a car show. Look for features you need—sliders, product zooms, Instagram feeds—you name it.

Don’t forget mobile. Seriously, most people shop on their phones while doing everything else. Make sure your theme looks sleek on any screen size.

Reviews are your friends. If Sally from Iowa found it helpful, you might too. But take ’em with a pinch of salt; some folks are never satisfied.

Lastly, support. Free stuff is great until it breaks. Ensure there’s a helpful community or some support for those inevitable hiccups.

Follow these pointers and you’ll pick a theme that’s as fabulous as your products. 🕶️

Why free Shopify themes are a good option?

Sure, who doesn’t love free stuff? Free Shopify themes are like finding a $20 bill in your old jeans. They help you save some serious cash while offering a decent range of customization. Money saved on themes means more budget for killer marketing campaigns, right?

Plus, many free themes are backed by Shopify’s solid dev team. You won’t get stuck with some buggy afterthought of a theme. These templates are user-focused and often just as snazzy as their paid counterparts. They can give your store a polished look without squeezing your wallet dry.

If you’re just dipping your toes into the e-commerce ocean, free themes are a no-brainer. They let you experiment without financial commitment. And hey, if your store blows up overnight, you can always upgrade later. It’s all about working smart, not hard!

Tips for Choosing the Right Template   

Choosing the right Shopify theme isn’t rocket science, but a little insider wisdom never hurt anyone, right? First, think about your brand style. If your store is all about Gothic fashion, a pastel floral theme won’t do the trick.

Keep an eye on functionality— it’s like checking for the engine before buying a car. Does it support all your desired features? Integrated social media? A snazzy product slider? Check the reviews like you’re stalking an ex’s Facebook. See what other users say about it.

Make sure it looks good on mobile. Folks are more likely to shop while waiting in line for their coffee than sitting at a desktop. Test drive different themes with your actual content. Sometimes what looks like gold turns out to be glitter.

And finally, don’t stress too much. It’s okay to start simple and upgrade later. After all, even Rome wasn’t built on a premium template!

Conclusion

Ready to wrap this up? Free Shopify templates can be lifesavers for new store owners with a tight budget. Don’t worry; you won’t sacrifice style or functionality. Imagine these themes as your e-commerce Swiss Army knife: they’ve got it all, and they don’t cost a dime.

Remember, your site’s look is its first impression. Make it count! Test different free themes like you’re trying on outfits before a big date. Do they fit your brand? Are they responsive? If your theme doesn’t make your products shine, swipe left.

Stay flexible. If your first choice doesn’t attract customers, try another. After all, even astronauts do test runs!

So go ahead, dive into the pool of the best free Shopify templates. You might find the perfect one faster than you can say, “Shopify theme for free!” Your future self—and your sales—will thank you.

Dawn

Dawn

Source Live Preview

Refresh

Refresh

Source Live Preview

Sense

Sense

Source Live Preview

Origin

Origin

Source Live Preview

Ride

Ride

Source Live Preview

Craft

Craft

Source Live Preview

Spotlight

Spotlight

Source Live Preview

Taste

Taste

Source Live Preview

Colorblock

Colorblock

Source Live Preview

Publisher

Publisher

Source Live Preview

Crave

Crave

Source Live Preview

Studio

Studio

Source Live Preview

Trade

Trade

Source Live Preview

Fashe

Fashe

Source Live Preview

Thalia

Thalia

Source Live Preview

Vendy Shopping Store Theme

Vendy Shopping Store Theme

Source Live Preview

Voonex

Voonex

Source Live Preview

The post Best Free Shopify Templates That Will Elevate Your E-Commerce Store appeared first on CSS Author.

Cybersecurity path

Category Image 041

Does Anyone know how a beginner like me in tech can start learning cyber security or starting a career in cyber engineering?

Extracting YouTube Channel Statistics in Python Using YouTube Data API

Featured Imgs 23

Are you interested in finding out what a YouTube channel mostly discusses? Do you want to analyze YouTube videos of a specific channel? If yes, we are in the same boat.

YouTube video titles are a great way to determine the channel's primary focus. Plotting a word cloud or a bar plot of the most frequently occurring words in YouTube video titles can give you precise insight into the nature of a YouTube channel. I will do exactly this in this tutorial using the Python programming language.

So, let's begin without ado.

Getting YouTube Data API Key

You can get information about a YouTube channel in Python programming via the YouTube Data API. However, to access the API, you must create a new project in Google Cloud Platform. You can do so for free.

image1.png

Once you create a new project, click the Go to APIs overview link, as shown in the screenshot below.

image2.png

Next, click the ENABLE APIS AND SERVICES link.

image3.png

Search for youtube data api v3.

image4.png

Click the ENABLE button.

image5.png

You will need to create credentials. To do so, click the CREDENTIALS link.

image6.png

If you have any existing credentials, you will see them. To create new credentials, click the + CREATE CREDENTIALS link and select API key.

image7.png

Your API key will be generated. Copy and save it in a secure place.

image8.png

Now, you can access the YouTube Data API in Python.

Installing and Importing Required Libraries

To begin our analysis, we must set up our Python environment by installing and importing the necessary libraries. The main libraries we will use are google-api-python-client for accessing the YouTube Data API, wordcloud for generating word clouds, and nltk (Natural Language Toolkit) for text processing.


!pip install google-api-python-client
!pip install wordcloud
!pip install nltk

Next, import the required libraries. These include googleapiclient.discovery for accessing the YouTube API, re for regular expressions to clean text, Counter from the collections module to count word frequencies, matplotlib.pyplot for plotting, WordCloud from the wordcloud library, and stopwords from nltk.corpus for removing common English words that do not contribute much to the analysis.


import googleapiclient.discovery
import re
from collections import Counter
import matplotlib.pyplot as plt
from wordcloud import WordCloud
import nltk
from nltk.corpus import stopwords
Extracting YouTube Channel Statistics

This section will extract video titles from a specific YouTube channel using the YouTube Data API. To do this, we need to set up our API client with the appropriate API key and configure the request to fetch video data.

First, specify the API details and initialize the YouTube API client using the API key you generated earlier. Replace "YOUR_API_KEY" with your actual API key.


# API information
api_service_name = "youtube"
api_version = "v3"

# API key
DEVELOPER_KEY = "YOUR_API_KEY"

# API client
youtube = googleapiclient.discovery.build(
    api_service_name,
    api_version,
    developerKey=DEVELOPER_KEY)

Next, define the channel ID of the YouTube channel you want to analyze. Here, we are using the channel ID UCYNS-_653RIE9x_BINefAMA as an example. You can use any other channel if you want.

We will then create a request to retrieve video titles for the specified channel. The request fetches up to 50 video titles per call. We use pagination to fetch additional results if available to handle more videos.


# Channel ID of the channel you want to search
channel_id = "UCYNS-_653RIE9x_BINefAMA"


# Request to retrieve all video titles for the specified channel
request = youtube.search().list(
    part="snippet",
    channelId=channel_id,
    maxResults=50,
    type="video"
)

# Initialize an empty list to store the video titles
video_titles = []

# Execute the request and retrieve the results
while request is not None:
    response = request.execute()
    for item in response["items"]:
        video_titles.append(item["snippet"]["title"])
    request = youtube.search().list_next(request, response)

Finally, print the total number of extracted video titles and display the first 10 titles to ensure our extraction process is working correctly.


# Print the video titles
print("Total extracted videos:", len(video_titles))
print("First 10 videos")
print("===============")
for title in video_titles[:10]:
    print(title)

Output:

image9.png

Plotting a Bar Plot with Most Frequently Occurring Words

This section will process the extracted video titles to identify the most frequently occurring words. We will then visualize these words using a bar plot.

First, download the NLTK stop words and define an additional set of stop words to exclude from our analysis. Stop words are common words like "the", "is", and "in" that does not provide significant meaning in our context.

nltk.download('stopwords')
stop_words = set(stopwords.words('english')) | {'sth', 'syed', 'talat', 'hussain'}

Next, filter the video titles to include only those containing Latin characters. This step ensures we focus on titles written in English or similar languages.

# Filter videos with Latin text only
latin_titles = [title for title in video_titles if re.search(r'[a-zA-Z]', title)]

We then clean the titles by removing special characters and tokenizing them into individual words. Stop words are excluded from the analysis.

# Remove special characters and tokenize
words = []
for title in latin_titles:
    cleaned_title = re.sub(r'[^\w\s]', '', title)  # Remove special characters
    for word in re.findall(r'\b\w+\b', cleaned_title):
        if word.lower() not in stop_words:
            words.append(word.lower())

Subsequently, we count the frequency of each word and identify the ten most common words. To avoid redundancy, exclude additional common words specific to the dataset, such as "sth", "syed", "talat", and "hussain".


# Count the frequency of words
word_counts = Counter(words)

# Get the 10 most common words
most_common_words = [word for word, count in word_counts.most_common(10) if word not in {'sth', 'syed', 'talat', 'hussain'}]

Finally, create a bar plot to visualize the frequency of the most common words.


# Create bar plot
plt.figure(figsize=(10, 5))
plt.bar(range(len(most_common_words)), [word_counts[word] for word in most_common_words])
plt.title('10 Most Common Words in Video Titles')
plt.xlabel('Words')
plt.ylabel('Frequency')
plt.xticks(range(len(most_common_words)), most_common_words, rotation=45)
plt.show()

Output:

image10.png

The output will display a bar plot showing the 10 most common words in the video titles, providing a clear insight into the primary topics discussed on the channel.

Word Cloud of Video Titles

We will create a word cloud to visualize the word frequency data further. A word cloud presents the most common words in a visually appealing way, and the size of each word represents its frequency.

First, generate the word cloud using the WordCloud class. The word cloud is generated from the list of words we compiled earlier. Next, we display the word cloud using Matplotlib.


# Generate word cloud
wordcloud = WordCloud(width=800, height=400, background_color='white').generate(' '.join(words))

# Display the word cloud
plt.figure(figsize=(12, 8))
plt.imshow(wordcloud, interpolation="bilinear")
plt.axis("off")
plt.title("Word Cloud of Video Titles")
plt.show()

Output:

image11.png

The resulting word cloud provides a visual representation of the most frequently occurring words in the video titles, allowing for quick and intuitive insights into the channel's content.

Conclusion

Analyzing YouTube video titles allows us to gain valuable insights into a channel's primary topics. Using Youtube Data API and libraries such as google-api-python-client, nltk, matplotlib, and wordcloud enables us to extract video data, process text, and visualize the most common words. This approach reveals the core themes of a YouTube channel, offering a clear understanding of its focus and audience interests. Whether for content creators or viewers, these techniques effectively uncover the essence of YouTube video discussions.

how to fix the error

Featured Imgs 23

Hi,
I'm trying to start learning C++ on "Sublime Text" an error came out
"file not recognized: File format not recognized
collect2.exe: error: ld returned 1 exit status"
what can I do about it

3 Marketing Secrets of Apple’s Success

Category Image 006
Apple Inc. is not just a technology company—it’s a phenomenon that has mastered the art of branding and marketing. In fact, Apple’s marketing strategy is a textbook example of how to create demand and build a loyal customer base. Here are three secrets behind Apple’s phenomenal success in marketing. Simplicity in Everything Apple’s philosophy of […]

Best Web Page Design Tools for Modern Creators -2024

Featured Imgs 23

Creating a visually appealing and user-friendly website is more important than ever. Modern creators need the best tools to bring their visions to life. From AI-powered web design to traditional software, today’s web page design tools suite diverse needs, ensuring dynamic and engaging web experiences.

Web Design and Web Builder Tools

Creators have various options to build stunning websites. Tools like Wix and WordPress allow easy customization. Webflow caters to more advanced users with intricate design needs. Squarespace offers beautifully designed templates, while Weebly provides intuitive drag-and-drop features. These tools simplify web development for everyone.

Wix

Wix

Wix is an intuitive online website design tool catering to beginners and professionals. With its drag-and-drop interface, users can create stunning web pages effortlessly. Wix’s flexibility allows creators to customize templates, making the design process both quick and seamless.

Source

WordPress

wordpress

One of the most popular website design programs is WordPress. It offers both beginners and pros numerous plugins to enhance functionality. With a vast library of themes, customizing your site is a breeze. Additionally, its SEO-friendly structure benefits content visibility.

Source

Webflow

Webflow

For creators seeking flexibility, Webflow is a strong contender. It offers a no-code platform, enabling users to design without deep coding knowledge. Adding animations and interactions is simple. Plus, its clean interface and robust e-commerce capabilities make it ideal for diverse projects.

Source

Squarespace

Squarespace

Squarespace offers an intuitive platform for effortless website creation. Its sleek templates cater to diverse industries, making it a go-to for many. With drag-and-drop functionality, users can customize their site seamlessly. E-commerce integration and responsive design features further enhance its appeal.

Source

Weebly

Weebly

Weebly is straightforward and ideal for beginners. It offers a drag-and-drop interface that makes creating websites a breeze. Users can quickly integrate e-commerce features, enhancing online store functionality. Built-in SEO tools help improve search engine visibility. Affordable plans provide great value for small businesses and entrepreneurs.

Source

AI Web Design Tools

From Divi AI to Uizard, these tools take web design to the next level. Framer, with its intuitive interface, simplifies complex tasks. Codewp is perfect for coders seeking efficiency. These AI-powered web design options are revolutionizing website creation, making models smarter and faster.

Divi AI

Divi-AI

Divi AI is an advanced tool for web design. It automates various aspects of website creation, allowing designers to focus on creativity. Users can easily generate custom layouts and content. By harnessing AI, Divi simplifies design tasks, speeding up project timelines significantly.

Source

Wix AI

Wix AI

Wix AI stands as a game changer for web creators. It streamlines site-building with smart templates and intuitive customization. The AI suggests design tweaks based on user input, making it almost like having a digital assistant. Complex tasks become straightforward, aiding both novices and experts alike.

Source

Hostinger AI

Hostinger AI

Hostinger AI elevates website design with practical features. It offers tailored templates that adapt to user needs. Ideal for beginners and pros, it simplifies complex tasks, making design effortless. The AI keeps updating, ensuring design stays current and effective.

Source

Framer

Framer

Framer is an outstanding online website design tool for modern creators. It integrates AI-powered web design to streamline the creation process. With its intuitive interface, even beginners can craft polished websites. Designers appreciate its flexibility and robust feature set for prototyping.

Source

Uizard

Uizard

Designers love Uizard for its simplicity. It rapidly converts sketches into digital wireframes. The AI-powered web design tool stands out for speed and ease of use. Ideal for prototyping, Uizard is a go-to choice in the web design tools list. It’s a game-changer for website design programs.

Source

Codewp

Codewp

Codewp is a valuable addition to the toolkit for web designers. It’s an AI-powered web design tool that streamlines the coding process. With advanced code generation capabilities, it eases the development of complex functionalities. This online website design tool is efficient and user-friendly.

Source

Graphic Design Tools for Web

For visual creativity, Adobe Photoshop stands out, offering extensive editing features. Adobe Illustrator is ideal for vector graphics. Canva simplifies designs with its templates. Figma excels in collaborative design. Affinity Designer provides a cost-effective alternative for professional-grade illustrations.

Figma

Figma

Figma is an online website design tool known for collaboration. It allows real-time editing and feedback. Users can create, share, and iterate designs swiftly. It’s favored for its intuitive interface and efficiency. Loved by teams, Figma simplifies design workflows.

Source

Canva

Canva

Canva is a versatile, online website design tool aimed at simplifying graphic creation. It offers pre-made templates that cater to various design needs. Users can drag and drop elements effortlessly. Its intuitive interface suits beginners and pros. Canva supports team collaboration too.

Source

Adobe Photoshop

Adobe Photoshop

Adobe’s powerful editing tool is essential for web designers. It offers a wide range of features, from simple photo edits to intricate graphic compositions. Users can adjust colors, retouch images, and create stunning visuals. Battery of filters and effects adds creative edge.

Source

Adobe Illustrator

Adobe Illustrator

For crafting vector graphics, Adobe Illustrator stands out. It’s perfect for creating logos, icons, sketches, and complex illustrations. The tool offers precision with its pen and shape tools. Users can scale artwork without losing quality. Integration with other Adobe products enriches the design process.

Source

Affinity Designer

Affinity Designer

For vector graphics, Affinity Designer stands out. It’s fast, smooth, and precise. Web designers appreciate its affordability and capability. Users can work on both vector and raster designs seamlessly. The interface is easy to navigate, making it a favorite among creatives.

Source

Typography Tools

Fonts Ninja assists in identifying any font you see. Fontjoy effortlessly generates font pairings. Google’s extensive catalog of free fonts is invaluable. Flipping Typical shows a quick preview of all fonts on your system. Typewolf offers daily inspiration. WhatTheFont identifies fonts from images instantly. Typescale helps in creating harmonious typographic scales.

Fonts Ninja

Fonts Ninja

Identifying fonts can be tricky for many designers. Fonts Ninja simplifies this by letting users hover over any text and instantly see font details. The tool is particularly useful for uncovering the niches of obscure typefaces. It’s a game-changer for anyone passionate about typography.

Source

Fontjoy

Fontjoy

Fontjoy is a nifty tool for those who love typography. It helps users find harmonious font pairings with ease. By generating fonts that work well together, it saves designers from endless trial and error. It’s perfect for quickly refining text aesthetics.

Source

Google Fonts

Google Fonts

Google Fonts offers a free library of web fonts that designers can easily integrate into their projects. Its large selection ensures a wide range of typography choices suitable for any style. The platform is user-friendly, making it simple to preview and implement fonts on web pages.

Source

Flipping Typical

Flipping Typical

This tool is a font previewer that showcases how different typefaces look with your text. Quick and intuitive, it allows designers to make informed typography choices swiftly. Users can easily compare and select fonts for their projects without hassle.

Source

Typewolf

Typewolf

Typewolf is a treasure trove for font enthusiasts. It offers curated lists of fonts, recommendations, and typography inspiration. This tool helps web designers find the right typeface for their projects by showcasing real-world examples. It’s a designer’s go-to for typography insights.

Source

WhatTheFont

WhatTheFont

This tool lets designers identify fonts from images. Simply upload an image, and WhatTheFont will match it to a database of typefaces. It’s quick and reliable. Perfect for those moments when you spot the perfect font but don’t know its name.

Source

Typescale

Typescale

Typescale is vital for creating balanced typographic systems. This online tool lets designers generate harmonious font pairings and scale them according to their design needs. It’s easy to use, offering real-time previews. Typescale boosts productivity by simplifying complex tasks.

Source

Adobe Fonts

Adobe Typekit

Source

Color Tools

Coolors offers intuitive color scheme generation. Color Hunt provides a community-driven palette library. Colormind uses AI to create stunning palettes. Pantone Connect ensures accurate color matching. Muzli Colors is perfect for fresh ideas. Paletton aids in choosing harmonious and complementary colors efficiently.

Coolors

Coolors

Coolors allows users to craft stunning color palettes with ease. It’s simple and intuitive, making it perfect for both beginners and seasoned designers. Users can generate, save, and export palettes in various formats. Coolors also offers numerous customization options for precise color control.

Source

Color Hunt

Color Hunt

Color Hunt is a simple and effective tool for finding and sharing color palettes. Users can explore a wide range of trending palettes created by the community. It’s free and user-friendly, making it ideal for quick inspiration in web design.

Source

Colormind

Colormind

Colormind is a powerful AI-powered web design tool focused on generating color palettes. It learns from popular art, movies, and images to create visually appealing combinations. Designers can lock certain colors and let the AI handle the rest. It’s intuitive and efficient for quick palette creation.

Source

Pantone Connect

Pantone Connect

Pantone Connect is an essential tool for designers focusing on precise color fidelity. It offers the complete Pantone library, ensuring colors are consistent across different mediums. The platform also allows users to create, organize, and share palettes. Integration with design software enhances workflow efficiency.

Source

Muzli Colors

Muzli colors

Muzli Colors simplifies the color selection process. It offers a fresh palette every time you open the app. Designers can explore endless color combinations effortlessly. It’s perfect for finding inspiration during creative blocks. Muzli Colors is an indispensable tool in any designer’s toolkit.

Source

Paletton

Paletton

Paletton offers an intuitive interface for creating color schemes. Designers select a main color, and Paletton generates harmonious palettes. It’s excellent for experimenting with color theory. The tool supports various designs, ensuring cohesive aesthetics for any web design project. Handy and user-friendly, Paletton simplifies color coordination.

Source

Wireframing and Prototyping Tools

Invisionapp is a popular choice for creating interactive prototypes. Figma offers real-time collaboration and a robust design interface. Justinmind simplifies the process with its drag-and-drop editor. These tools streamline the transition from concept to finished web design, saving time and reducing errors.

Invisionapp

Invisionapp

Invisionapp excels in creating interactive prototypes. It’s user-friendly and integrates seamlessly with other design tools. The platform offers valuable features like version control and feedback collection. Designers appreciate its ability to simulate user experiences effectively, bolstering collaboration and streamlining project timelines.

Source

Figma

Figma

Figma is a versatile online website design tool. It supports real-time collaboration, making teamwork easier. Designers love its user-friendly interface and extensive features. Figma’s robust vector tools and prototyping capabilities set it apart. It’s ideal for creating dynamic designs and interactive prototypes efficiently.

Source

Justinmind

Justinmind

Justinmind is a reliable prototyping tool. It helps designers create interactive wireframes effortlessly. With its drag-and-drop interface, even beginners find it accessible. It’s perfect for both mobile and web applications. Users can test and iterate designs with ease, improving overall workflow efficiency.

Source

Free Web Hosting Sites

For newcomers and seasoned developers alike, finding free web hosting can be a treasure hunt. x10Hosting delivers unlimited bandwidth. 000webhost is a reliable choice with no ads. Firebase offers dynamic functionalities. Awardspace is beginner-friendly, while Byethost ensures performance. GitHub Pages suits coders perfectly. InfinityFree combines storage and speed.

x10Hosting

x10Hosting

Offering unlimited bandwidth and storage, x10Hosting is a prime choice for those seeking cost-effective solutions. Its user-friendly interface makes it accessible for beginners. With a robust uptime guarantee, x10Hosting ensures your site remains live and active. Ideal for personal projects.

Source

000webhost

000webhost

Providing free and reliable hosting, 000webhost is a favorite among budding developers. Users appreciate its simple control panel and easy setup process. With no ads, 000webhost offers a professional look for personal and small business sites. Enjoy features like custom domains and automatic backups.

Source

Firebase

Firebase

Firebase offers robust tools for web designers. With real-time databases, hosting, and authentication services, it simplifies backend development. Users can quickly deploy sites without fuss. Firebase’s intuitive interface supports seamless project management. It’s a fantastic choice for efficient, hassle-free hosting.

Source

Awardspace

Awardspace

Awardspace provides free hosting with a user-friendly interface. Perfect for beginners, it’s reliable and straightforward. This platform includes one-click WordPress installation, ensuring a smooth start for new projects. Additionally, their customer support is responsive, enhancing the overall experience for users.

Source

Byethost

Byethost

Byethost offers free web hosting with reliable uptime and generous storage. It’s ideal for those looking to start a new website on a budget. Users can expect a simple-to-navigate control panel and useful tools for managing their sites. This platform’s customer support is available 24/7.

Source

GitHub Pages

GitHub Pages

This service provides a seamless way for developers to host static websites directly from their GitHub repositories. It’s particularly great for projects and portfolios. Users love its simplicity and integration with Git version control. Plus, it’s entirely free, making it an attractive option.

Source

InfinityFree

InfinityFree

InfinityFree offers free web hosting with unlimited disk space and bandwidth. It includes a free subdomain and a user-friendly control panel. Perfect for beginners, this service ensures uptime and reliability without any hidden costs. Ideal for those seeking an uncomplicated hosting solution.

Source

Text Editor Tools for Web Development

Visual Studio Code

Visual Studio Code

Source

Sublime Text

Sublime Text

Source

Atom

Atom

Source

Brackets

Brackets

Source

Bluefish

Bluefish

Source

Vim

Vim

Source

Codepen

Codepen

Source

Light Table

Light Table

Source

Zed

Zed

Source

TextMate

TextMate

Source

The post Best Web Page Design Tools for Modern Creators -2024 appeared first on CSS Author.

Retrieval Augmented Generation with Claude 3.5 Sonnet

Featured Imgs 23

In my previous article I presented results comparing Anthropic Claude 3.5 Sonnet and OpenAI GPT-4o models for zero-shot text classification. The results showed that the Claude 3.5 Sonnet significantly outperformed GPT-4o.

These results motivated me to develop a simple retrieval augmented generation system with LangChain that enables the Claude 3.5 Sonnet model to answer questions pertaining to custom documents.

By the end of this article, you will know how to develop a chatbot that uses the Claude 3.5 Sonnet LLM to answer questions on custom documents.

So, let's begin without ado.

Installing and Importing Required Libraries

The following script installs the libraries required to run scripts in this article.

!pip install -U langchain
!pip install -U langchain-anthropic
!pip install langchain-openai
!pip install pypdf
!pip install faiss-cpu

Subsequently, the script below imports the required libraries into your Python application.


from langchain_anthropic import ChatAnthropic

from langchain_core.prompts import ChatPromptTemplate
from langchain_core.output_parsers import StrOutputParser
from langchain_community.document_loaders import PyPDFLoader
from langchain.text_splitter import RecursiveCharacterTextSplitter
from langchain_openai import OpenAIEmbeddings
from langchain_community.vectorstores import FAISS
from langchain.chains.combine_documents import create_stuff_documents_chain
from langchain.chains import create_retrieval_chain
from langchain_core.documents import Document
from langchain.chains import create_history_aware_retriever
from langchain_core.prompts import MessagesPlaceholder
from langchain_core.messages import HumanMessage, AIMessage
import os

Generating Default Response with Claude 3.5 Sonnet

Let's first generate a default response using Claude 3.5 Sonnet LLM in LangChain.

You will need an anthropic API key which you can get here.

Next, create an object of the ChatAnthropic class and pass the anthropic API key, the model ID, and the temperature value to its constructor. The temperature specifies how creative a model should be while generating responses. Higher temperature values allow models to be more creative.

Finally, pass the prompt to the invoke() method of the ChatAnthropic object to generate the model response.

anthropic_api_key = os.environ.get('ANTHROPIC_API_KEY')

llm = ChatAnthropic(model="claude-3-5-sonnet-20240620",
                     anthropic_api_key = anthropic_api_key,
                     temperature = 0.3)

result = llm.invoke("Write a funny poem for an ice cream shop on a beach.")
print(result.content)

Output:

image1.png

The LangChain ChatPromptTemplate class allows you to create a chatbot. The from_messages() method indicates that the conversation should be executed in message format. In this setup, you must specify the value for the user attribute, while the system attribute is optional.

You can use the StrOutputParser class to parse the model response in string format, as shown in the script below:


prompt = ChatPromptTemplate.from_messages([
    ("system", '{assistant}'),
    ("user", "{input}")
])

output_parser = StrOutputParser()

chain = prompt | llm | output_parser

result = chain.invoke(
    {"assistant": "You are a comedian",
     "input": "Write a funny poem for a music store on a beach."}
)
print(result)

Output:

image2.png

RAG with Claude 3.5 Sonnet

Now you know how to call the Claude 3.5 Sonnet LLM in LangChain. In this section, we will augment the Claude 3.5 Sonnet model's knowledge, making it capable of answering questions related to the documents it had not seen during training.

Step 1: Loading and Splitting Documents

We start by loading and splitting the document using PyPDFLoader. In this case, we load "The English Constitution" by Walter Bagehot from a URL.

The following script's load_and_split() method ensures the document is parsed correctly and divided into manageable sections.


loader = PyPDFLoader("https://web.archive.org/web/20170809122528id_/http://global-settlement.org/pub/The%20English%20Constitution%20-%20by%20Walter%20Bagehot.pdf")
docs = loader.load_and_split()
Step 2: Creating Embeddings

Next, we create embeddings for the text using OpenAI API's OpenAIEmbeddings class. We then split the text into smaller chunks with RecursiveCharacterTextSplitter and created a FAISS vector store using the split documents and their embeddings. This step transforms the text into a format suitable for retrieval and similarity search.


openai_key = os.environ.get('OPENAI_API_KEY')

embeddings = OpenAIEmbeddings(openai_api_key = openai_key)

text_splitter = RecursiveCharacterTextSplitter()
documents = text_splitter.split_documents(docs)
vector = FAISS.from_documents(documents, embeddings)
Step 3: Crafting the Prompt Template

The next step is to define a prompt template using the ChatPromptTemplate class. The template instructs the model to answer questions based solely on the provided context, ensuring accurate and relevant responses. The create_stuff_documents_chain function links this template with the language model, forming a document chain that will be used for generating responses.


prompt = ChatPromptTemplate.from_template("""Answer the following question based only on the provided context:

Question: {input}

Context: {context}
"""
)

document_chain = create_stuff_documents_chain(llm, prompt)
Step 4: Setting Up the Retriever

We convert the vector store into a retriever object with vector.as_retriever() method. The retriever, combined with the document chain, forms a retrieval_chain. This setup enables the system to fetch relevant document sections based on the user's query and use them as context for generating answers.


retriever = vector.as_retriever()
retrieval_chain = create_retrieval_chain(retriever, document_chain)
Step 5: Generating Responses

Finally, we define the generate_response() function that takes a query as input, invokes the retrieval chain, and prints the answer.


def generate_response(query):
    response = retrieval_chain.invoke({"input": query})
    print(response["answer"])

To demonstrate the system in action, we run a few example queries as shown below:

Query1:


query = "What is the total number of members of the house of commons?"
generate_response(query)

Output:

image3.png

Query2:


query = "What is the difference between the house of lords and house of commons? How members are elected for both?"
generate_response(query)

Output:

image4.png

Query3:


query = "How many players participate in a football game?"
generate_response(query)

Output:

image5.png

You can see that the model correctly replied to queries related to custom document and refused to generate response to questions that are not related to the document.

Conclusion

The retrieval augmented generation (RAG) technique has revolutionized the development of customized chatbots for various data sources. In this article, we demonstrated how to build a chatbot using the Claude 3.5 Sonnet model to answer questions based on previously unseen documents. This method can be applied to create chatbots capable of querying diverse data types such as PDFs, websites, text documents, and beyond.

I encourage you to leverage Claude 3.5 Sonnet to develop your custom chatbots, explore its powerful capabilities, and share your experience and feedback in the comments section.

Tales Of An Eternal Summer (July 2024 Wallpapers Edition)

Fotolia Subscription Monthly 4685447 Xl Stock

For many of us, July is the epitome of summer. The time for spending every free minute outside to enjoy the sun and those seemingly endless summer days, be it in a nearby park, by a lake, or on a trip exploring new places. So why not bring a bit of that summer joy to your desktop, too?

For this month’s wallpapers post, artists and designers from across the globe once again tickled their creativity to capture the July feeling in a collection of desktop wallpapers. They all come in versions with and without a calendar for July 2024 and can be downloaded for free — as it has been a Smashing tradition for more than 13 years already. A huge thank-you to everyone who submitted their artworks this month — this post wouldn’t exist without you!

As a little bonus goodie, we also compiled a selection of July favorites from our wallpapers archives at the end of this post. So maybe you’ll discover one of your almost-forgotten favorites in here, too? Have a fantastic July, no matter what your plans are!

  • 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.

Diving Among Corals

“The long-awaited vacation is coming closer. After working all year, we find ourselves with months that, although we don’t stop completely, are lived differently. We enjoy the days and nights more, and if we can, the beach will keep us company. Therefore, we’ll spend this month in Australia, enjoying the coral reefs and diving without limits.” — Designed by Veronica Valenzuela from Spain.

Level Up

“Join gamers worldwide on National Video Game Day to honor the rich history and vibrant culture of gaming. Enjoy exclusive discounts on top titles, participate in exciting online tournaments, and dive into special events featuring your favorite games. Whether you're a casual player or a dedicated enthusiast, there’s something for everyone to celebrate on this epic day!” — Designed by PopArt Studio from Serbia.

Bigfoot And The Little Girl

“This heartwarming moment captures an unlikely friendship of a gentle Bigfoot and an adorable little girl set against the backdrop of a magical and serene evening in nature.” — Designed by Reethu M from London.

Good Night

Designed by Ricardo Gimenes from Sweden.

Floral Elegance Of July

“The inspiration came from the lush gardens and floral landscapes that thrive in the height of summer. I wanted to bring the elegance and tranquility of these blooming flowers into a calendar that people can enjoy throughout the month of July.” — Designed by Hyfa K from India.

No More Hugs

Designed by Ricardo Gimenes from Sweden.

Olympics Stadium

“We have been waiting for it for many months: The Paris 2024 Olympics Games are coming in July! My drawing is a vision of the joyful activity of athletes in the stadium, with only colored tracks. I chose to use the colors of the Olympics rings. Let’s go to Paris or watch it on TV.” — Designed by Philippe Brouard from France.

Full Buck Moon

“July is the month of the full buck moon, named after the fact that many deer regrow their antlers around this time. It is also when the United States celebrate their Independence Day with fireworks and fun. I decided to combine these aspects into a magical encounter during the fourth of July. It takes place in a field of larkspur which is a flower associated with July.” — Designed by Quincy van Geffen from the Netherlands.

Celebrating World Chocolate Day

“World Chocolate Day, celebrated on July 7th, invites chocolate lovers worldwide to indulge in their favorite treat. Commemorating chocolate’s introduction to Europe, this day celebrates its global popularity. Enjoy dark, milk, or white chocolate, bake delicious desserts, and share the sweetness with loved ones.” — Designed by Reethu M from London.

Birdie July

Designed by Lívi Lénárt from Hungary.

Summer Cannonball

“Summer is coming in the northern hemisphere and what better way to enjoy it than with watermelons and cannonballs.” — Designed by Maria Keller from Mexico.

In Space

Designed by Lieke Dol from the Netherlands.

A Flamboyance Of Flamingos

“July in South Africa is dreary and wintery so we give all the southern hemisphere dwellers a bit of color for those gray days. And for the northern hemisphere dwellers a bit of pop for their summer!” — Designed by Wonderland Collective from South Africa.

Eternal Summer

“And once you let your imagination go, you find yourself surrounded by eternal summer, unexplored worlds, and all-pervading warmth, where there are no rules of physics and colors tint the sky under your feet.” — Designed by Ana Masnikosa from Belgrade, Serbia.

Day Turns To Night

Designed by Xenia Latii from Germany.

Tropical Lilies

“I enjoy creating tropical designs. They fuel my wanderlust and passion for the exotic, instantaneously transporting me to a tropical destination.” — Designed by Tamsin Raslan from the United States.

Road Trip In July

“July is the middle of summer, when most of us go on road trips, so I designed a calendar inspired by my love of traveling and summer holidays.” — Designed by Patricia Coroi from Romania.

The Ancient Device

Designed by Ricardo Gimenes from Sweden.

Taste Like Summer

“In times of clean eating and the world of superfoods there is one vegetable missing. An old, forgotten one. A flower actually. Rare and special. Once it had a royal reputation (I cheated a bit with the blue). The artichocke — this is my superhero in the garden! I am a food lover — you too? Enjoy it — dip it!” — Designed by Alexandra Tamgnoué from Germany.

Island River

“Make sure you have a refreshing source of ideas, plans and hopes this July. Especially if you are to escape from urban life for a while.” — Designed by Igor Izhik from Canada.

Cactus Hug

Designed by Ilaria Bagnasco from Italy.

Under The Enchanting Moonlight

“Two friends sat under the enchanting moonlight, enjoying the serene ambiance as they savoured their cups of tea. It was a rare and precious connection that transcended the ordinary, kindled by the magic of the moonlight. Eventually, as the night began to wane, they reluctantly stood, their empty cups in hand. They carried with them the memories and the tranquility of the moonlit tea session, knowing that they would return to this special place to create new memories in the future.” — Designed by Bhabna Basak from India.

DJ Little Bird

Designed by Ricardo Gimenes from Sweden.

Heated Mountains

“Warm summer weather inspired the color palette.” — Designed by Marijana Pivac from Croatia.

July Flavor

Designed by Natalia Szendzielorz from Poland.

Summer Heat

Designed by Xenia Latii from Berlin, Germany.

Mason Jar

“Make the days count this summer!” — Designed by Meghan Pascarella from the United States.

Summer Essentials

“A few essential items for the summertime weather at the beach, park, and everywhere in-between.” — Designed by Zach Vandehey from the United States.

Captain Amphicar

“My son and I are obsessed with the Amphicar right now, so why not have a little fun with it?” — Designed by 3 Bicycles Creative from the United States.

Hotdog

Designed by Ricardo Gimenes from Sweden.

Less Busy Work, More Fun!

Designed by ActiveCollab from the United States.

Sweet Summer

“In summer everything inspires me.” — Designed by Maria Karapaunova from Bulgaria.

Fire Camp

“What’s better than a starry summer night with an (unexpected) friend around a fire camp with some marshmallows? Happy July!” — Designed by Etienne Mansard from the UK.

Riding In The Drizzle

“Rain has come, showering the existence with new seeds of life. Everywhere life is blooming, as if they were asleep and the falling music of raindrops have awakened them. Feel the drops of rain. Feel this beautiful mystery of life. Listen to its music, melt into it.” — Designed by DMS Software from India.

An Intrusion Of Cockroaches

“Ever watched Joe’s Apartment when you were a kid? Well, that movie left a soft spot in my heart for the little critters. Don’t get me wrong: I won’t invite them over for dinner, but I won’t grab my flip flop and bring the wrath upon them when I see one running in the house. So there you have it… three roaches… bringing the smack down on that pesky human… ZZZZZZZAP!!” — Designed by Wonderland Collective from South Africa.

July Rocks!

Designed by Joana Moreira from Portugal.

Frogs In The Night

“July is coming and the nights are warmer. Frogs look at the moon while they talk about their day.” — Designed by Veronica Valenzuela from Spain.

Opengl, java background color rendering problem

Featured Imgs 23

Hello,

I have simple problem for professionalist (that i think ) but i asked all available AI about it and none was able to help and solve problem. so nothing is able to help me in this.

I have simple app that show 3 colored axes and camera that move around this scene by mouse click-hold . the problem is that after run appear first white backfround of frame for a second then its normal black background. i dont want this white at beginning.
can you tell me what in code change to get rid of this white flash at beginning ? I tried already plenty things.

This is the project code IntellJ, java , maven , with additional newest libraries lwjgl (lwjgl-release-3.31) and joml ( joml-1.10.61 ), this is whole code of 3d opengl - app 2 classes : Main and Camera , code is :

package org.example;

import org.joml.Matrix4f;
import org.lwjgl.glfw.GLFWVidMode;
import org.lwjgl.glfw.GLFWErrorCallback;
import org.lwjgl.opengl.GL;
import org.lwjgl.system.MemoryStack;

import java.nio.FloatBuffer;
import java.nio.IntBuffer;
import java.util.Objects;

import static org.lwjgl.glfw.Callbacks.glfwFreeCallbacks;
import static org.lwjgl.glfw.GLFW.*;
import static org.lwjgl.opengl.GL11.*;
import static org.lwjgl.system.MemoryStack.stackPush;
import static org.lwjgl.system.MemoryUtil.NULL;

public class Main {

    private long window;
    private Camera camera;
    private float lastMouseX, lastMouseY;
    private boolean firstMouse = true;
    private boolean mousePressed = false;

    public void run() {
        init();
        loop();

        glfwFreeCallbacks(window);
        glfwDestroyWindow(window);

        glfwTerminate();
        Objects.requireNonNull(glfwSetErrorCallback(null)).free();
    }

    private void init() {
        GLFWErrorCallback.createPrint(System.err).set();

        if (!glfwInit()) {
            throw new IllegalStateException("Unable to initialize GLFW");
        }

        glfwDefaultWindowHints();
        glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE);
        glfwWindowHint(GLFW_RESIZABLE, GLFW_TRUE);
        // Request a double-buffered window
        glfwWindowHint(GLFW_DOUBLEBUFFER, GL_TRUE);

        window = glfwCreateWindow(800, 600, "3D Scene", NULL, NULL);
        if (window == NULL) {
            throw new RuntimeException("Failed to create the GLFW window");
        }

        glfwSetCursorPosCallback(window, (window, xpos, ypos) -> {
            if (firstMouse) {
                lastMouseX = (float) xpos;
                lastMouseY = (float) ypos;
                firstMouse = false;
            }

            if (mousePressed) {
                float dx = (float) xpos - lastMouseX;
                float dy = (float) ypos - lastMouseY;
                lastMouseX = (float) xpos;
                lastMouseY = (float) ypos;

                camera.rotate(dy * 0.1f, dx * 0.1f);
            }
        });

        glfwSetMouseButtonCallback(window, (window, button, action, mods) -> {
            if (button == GLFW_MOUSE_BUTTON_LEFT) {
                if (action == GLFW_PRESS) {
                    mousePressed = true;
                    firstMouse = true; // Reset firstMouse when the button is pressed
                } else if (action == GLFW_RELEASE) {
                    mousePressed = false;
                }
            }
        });

        glfwSetScrollCallback(window, (window, xoffset, yoffset) -> {
            camera.zoom((float) yoffset * -0.5f);
        });

        glfwSetKeyCallback(window, (window, key, scancode, action, mods) -> {
            if (key == GLFW_KEY_ESCAPE && action == GLFW_RELEASE) {
                glfwSetWindowShouldClose(window, true);
            }
        });

        try (MemoryStack stack = stackPush()) {
            IntBuffer pWidth = stack.mallocInt(1);
            IntBuffer pHeight = stack.mallocInt(1);

            glfwGetWindowSize(window, pWidth, pHeight);

            GLFWVidMode vidmode = glfwGetVideoMode(glfwGetPrimaryMonitor());

            glfwSetWindowPos(
                    window,
                    (vidmode.width() - pWidth.get(0)) / 2,
                    (vidmode.height() - pHeight.get(0)) / 2
            );
        }

        glfwMakeContextCurrent(window);
        glfwSwapInterval(1);
        glfwShowWindow(window);

        GL.createCapabilities();

        glEnable(GL_DEPTH_TEST);

        // Set the projection matrix
        glMatrixMode(GL_PROJECTION);
        glLoadIdentity();
        float aspectRatio = 800.0f / 600.0f;
        glFrustum(-aspectRatio, aspectRatio, -1, 1, 1, 100);

        camera = new Camera(20, 30, 45);
    }

    private void loop() {
        // Set the clear color explicitly
        glClearColor(0.0f, 0.0f, 0.0f, 1.0f);

        while (!glfwWindowShouldClose(window)) {
            // Clear the color and depth buffers
            glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

            Matrix4f viewMatrix = camera.getViewMatrix();
            FloatBuffer fb = org.lwjgl.BufferUtils.createFloatBuffer(16);
            viewMatrix.get(fb);

            glMatrixMode(GL_MODELVIEW);
            glLoadMatrixf(fb);

            drawAxes();

            glfwSwapBuffers(window);
            glfwPollEvents();
        }
    }


    private void drawAxes() {
        glBegin(GL_LINES);

        // X axis in red
        glColor3f(1.0f, 0.0f, 0.0f);
        glVertex3f(-20.0f, 0.0f, 0.0f);
        glVertex3f(20.0f, 0.0f, 0.0f);

        // Y axis in green
        glColor3f(0.0f, 1.0f, 0.0f);
        glVertex3f(0.0f, -20.0f, 0.0f);
        glVertex3f(0.0f, 20.0f, 0.0f);

        // Z axis in yellow
        glColor3f(1.0f, 1.0f, 0.0f);
        glVertex3f(0.0f, 0.0f, -20.0f);
        glVertex3f(0.0f, 0.0f, 20.0f);

        glEnd();
    }

    public static void main(String[] args) {
        new Main().run();
    }
}

and Camera code :

package org.example;
import org.joml.Matrix4f;
import org.joml.Vector3f;

public class Camera {

private Vector3f position;
private float pitch;
private float yaw;
private float distance;

public Camera(float distance, float pitch, float yaw) {
    this.position = new Vector3f(0, 0, 0);
    this.pitch = pitch;
    this.yaw = yaw;
    this.distance = distance;
}

public Matrix4f getViewMatrix() {
    Matrix4f viewMatrix = new Matrix4f();
    viewMatrix.identity();

    // Calculate the camera position based on spherical coordinates
    float x = (float) (distance * Math.sin(Math.toRadians(pitch)) * Math.cos(Math.toRadians(yaw)));
    float y = (float) (distance * Math.cos(Math.toRadians(pitch)));
    float z = (float) (distance * Math.sin(Math.toRadians(pitch)) * Math.sin(Math.toRadians(yaw)));

    position.set(x, y, z);

    viewMatrix.lookAt(position, new Vector3f(0, 0, 0), new Vector3f(0, 1, 0));
    return viewMatrix;
}

public void rotate(float pitchDelta, float yawDelta) {
    this.pitch += pitchDelta;
    this.yaw += yawDelta;
}

public void zoom(float distanceDelta) {
    this.distance += distanceDelta;
    if (this.distance < 1.0f) {
        this.distance = 1.0f; // Prevent camera from getting too close
    }
}

public Vector3f getPosition() {
    return position;
}

public float getPitch() {
    return pitch;
}

public float getYaw() {
    return yaw;
}

public float getDistance() {
    return distance;
}


}

and pom.xml file is :

4.0.0
<groupId>org.example</groupId>
<artifactId>3dscene</artifactId>
<version>1.0-SNAPSHOT</version>

<properties>
    <maven.compiler.source>17</maven.compiler.source>
    <maven.compiler.target>17</maven.compiler.target>
</properties>

<dependencies>
    <!-- LWJGL dependencies -->
    <dependency>
        <groupId>org.lwjgl</groupId>
        <artifactId>lwjgl</artifactId>
        <version>3.3.1</version>
    </dependency>
    <dependency>
        <groupId>org.lwjgl</groupId>
        <artifactId>lwjgl-glfw</artifactId>
        <version>3.3.1</version>
    </dependency>
    <dependency>
        <groupId>org.lwjgl</groupId>
        <artifactId>lwjgl-opengl</artifactId>
        <version>3.3.1</version>
    </dependency>
    <dependency>
        <groupId>org.lwjgl</groupId>
        <artifactId>lwjgl-stb</artifactId>
        <version>3.3.1</version>
    </dependency>
    <dependency>
        <groupId>org.lwjgl</groupId>
        <artifactId>lwjgl</artifactId>
        <version>3.3.1</version>
        <classifier>natives-windows</classifier>
    </dependency>
    <dependency>
        <groupId>org.lwjgl</groupId>
        <artifactId>lwjgl-glfw</artifactId>
        <version>3.3.1</version>
        <classifier>natives-windows</classifier>
    </dependency>
    <dependency>
        <groupId>org.lwjgl</groupId>
        <artifactId>lwjgl-opengl</artifactId>
        <version>3.3.1</version>
        <classifier>natives-windows</classifier>
    </dependency>
    <dependency>
        <groupId>org.lwjgl</groupId>
        <artifactId>lwjgl-stb</artifactId>
        <version>3.3.1</version>
        <classifier>natives-windows</classifier>
    </dependency>

    <!-- JOML dependency -->
    <dependency>
        <groupId>org.joml</groupId>
        <artifactId>joml</artifactId>
        <version>1.10.5</version>
    </dependency>
</dependencies>

<repositories>
    <repository>
        <id>sonatype</id>
        <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
    </repository>
</repositories>

Comparing GPT-4o vs Claude 3.5 Sonnet for Zero Shot Text Classification

Featured Imgs 23

On June 20, 2024, Anthropic released the Claude 3.5 sonnet large language model. Claude claims it to be the state-of-the-art model for many natural language processing tasks, surpassing the OpenAI GPT-4o model.

My first test for comparing two large language models is their zero-shot text classification ability. In this article, I will compare the Antropic Claude 3.5 sonnet with the OpenAI GPT-4o model for zero-shot tweet sentiment classification.

So, let's begin without ado.

Importing and Installing Required Libraries

The following script installs the Anthropic and OpenAI libraries to access the corresponding APIs.


!pip install anthropic
!pip install openai

The script below imports the required libraries into your Python application.


import os
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score
import anthropic
from openai import OpenAI

Importing and Preprocessing the Dataset

We will use the Twitter US Airline Sentiment dataset to perform zero-shot classification. You can download the dataset from Kaggle.

The following script imports the dataset into a Pandas DataFrame.

## Dataset download link
## https://www.kaggle.com/datasets/crowdflower/twitter-airline-sentiment?select=Tweets.csv

dataset = pd.read_csv(r"D:\Datasets\tweets.csv")
print(dataset.shape)
dataset.head()

Output:

image1.png

Tweet sentiment falls into three categories: neutral, positive, and negative. For comparison, we will filter 100 tweets. The neutral, positive, and negative categories will contain 34, 33, and 33 tweets, respectively.

# Remove rows where 'airline_sentiment' or 'text' are NaN
dataset = dataset.dropna(subset=['airline_sentiment', 'text'])

# Remove rows where 'airline_sentiment' or 'text' are empty strings
dataset = dataset[(dataset['airline_sentiment'].str.strip() != '') & (dataset['text'].str.strip() != '')]

# Filter the DataFrame for each sentiment
neutral_df = dataset[dataset['airline_sentiment'] == 'neutral']
positive_df = dataset[dataset['airline_sentiment'] == 'positive']
negative_df = dataset[dataset['airline_sentiment'] == 'negative']

# Randomly sample records from each sentiment
neutral_sample = neutral_df.sample(n=34)
positive_sample = positive_df.sample(n=33)
negative_sample = negative_df.sample(n=33)

# Concatenate the samples into one DataFrame
dataset = pd.concat([neutral_sample, positive_sample, negative_sample])

# Reset index if needed
dataset.reset_index(drop=True, inplace=True)

# print value counts
print(dataset["airline_sentiment"].value_counts())

Output:

image2.png

Zero Shot Text Classification with GPT-4o

We will first perform zero-shot text classification with GPT-4o. Remember to get your OpenAI API key before executing the following script.

The script below defines a function find_sentiment() that accepts the client and model parameters. The client corresponds to the client, i.e., anthropic or OpenAI, while the model corresponds to Claude 3.5 Sonnet or GPT-4o.

The find_sentiment() function iterates through all the tweets from the filtered dataset and predicts sentiment for each tweet. The predicted sentiments are then compared with the actual sentiment values to determine the model's accuracy.


def find_sentiment(client, model):

    tweets_list = dataset["text"].tolist()


    all_sentiments = []

    i = 0
    exceptions = 0
    while i < len(tweets_list):

        try:
            tweet = tweets_list[i]
            content = """What is the sentiment expressed in the following tweet about an airline?
            Select sentiment value from positive, negative, or neutral. Return only the sentiment value in small letters.
            tweet: {}""".format(tweet)

            sentiment_value = client.chat.completions.create(
                                  model= model,
                                  temperature = 0,
                                  max_tokens = 10,
                                  messages=[
                                        {"role": "user", "content": content}
                                    ]
                                ).choices[0].message.content

            all_sentiments.append(sentiment_value)
            i = i + 1
            print(i, sentiment_value)

        except Exception as e:
            print("===================")
            print("Exception occurred:", e)
            exceptions += 1

    print("Total exception count:", exceptions)
    accuracy = accuracy_score(all_sentiments, dataset["airline_sentiment"])
    print("Accuracy:", accuracy)

Next, we create an OpenAI client and pass the client object along with the gpt-4o model to predict sentiments.


%%time
client = OpenAI(
    # This is the default and can be omitted
    api_key = os.environ.get('OPENAI_API_KEY'),
)
model = "gpt-4o"

find_sentiment(client, model)

Output:

image3.png

The above output shows that GPT-4o achieved an accuracy of 76%.

Zero Shot Text Classification with Claude 3.5-Sonnet

Let's now predict the sentiment for the same set of tweets using the Claude 3.5 sonnet model. We define the find_sentiment_claude() function which is similar to the find_sentiment() function, but predicts sentiments using the Claude 3.5 sonnet model.


def find_sentiment_claude(client, model):

    tweets_list = dataset["text"].tolist()


    all_sentiments = []

    i = 0
    exceptions = 0
    while i < len(tweets_list):

        try:
            tweet = tweets_list[i]
            content = """What is the sentiment expressed in the following tweet about an airline?
            Select sentiment value from positive, negative, or neutral. Return only the sentiment value in small letters.
            tweet: {}""".format(tweet)

            sentiment_value = client.messages.create(
                                model= model,
                                max_tokens=10,
                                temperature=0.0,
                                messages=[
                                    {"role": "user", "content": content}
                                ]
                            ).content[0].text

            all_sentiments.append(sentiment_value)
            i = i + 1
            print(i, sentiment_value)

        except Exception as e:
            print("===================")
            print("Exception occurred:", e)
            exceptions += 1

    print("Total exception count:", exceptions)
    accuracy = accuracy_score(all_sentiments, dataset["airline_sentiment"])
    print("Accuracy:", accuracy)

The script below calls the find_sentiment_claude() function using the anthropic client and the claude-3-5-sonnet-20240620 (the id for the Claude 3.5 sonnet) model.


%%time
client = anthropic.Anthropic(
    # defaults to os.environ.get("ANTHROPIC_API_KEY")
    api_key = os.environ.get('ANTHROPIC_API_KEY')
)

model = "claude-3-5-sonnet-20240620"

find_sentiment_claude(client, model)

Output:

image4.png

The above output shows that the Claude 3.5 Sonnet model achieved an accuracy of 83%, which is significantly better than the GPT-4o model.

Final Verdict

Here is an overall comparison between the Claude Sonnet 3.5 and the GPT-4o model.

image5.png

Given the price, performance, and context window size, I prefer the Claude 3.5 Sonnet over other proprietary models such as GPT-4o.

Feel free to share your opinions. I would be very interested in any results you obtain using the two models.

Increase Your Revenue with Our New Woo Affiliate Program

Featured Imgs 23
We're re-launching the Woo Affiliate Program to help you generate new revenue by promoting the web's most trusted and popular WooCommerce solutions. Participating affiliates will be able to monetize their site's traffic by promoting 800+ products and services from the Woo Marketplace alongside the full range of Automattic's product suite, including WordPress.com hosting packages, domain registration, Jetpack, Sensei LMS, and more. 

How To Improve Your Microcopy: UX Writing Tips For Non-UX Writers

Category Image 073

Throughout my UX writing career, I’ve held many different roles: a UX writer in a team of UX writers, a solo UX writer replacing someone who left, the first and only UX writer at a company, and even a teacher at a UX writing course, where I reviewed more than 100 home assignments. And oh gosh, what I’ve seen.

Crafting microcopy is not everyone’s strong suit, and it doesn’t have to be. Still, if you’re a UX designer, product manager, analyst, or marketing content writer working in a small company, on an MVP, or on a new product, you might have to get by without a UX writer. So you have the extra workload of creating microcopy. Here are some basic rules that will help you create clear and concise copy and run a quick health check on your designs.

Ensure Your Interface Copy Is Role-playable
Why it’s important:
  • To create a friendly, conversational experience;
  • To work out a consistent interaction pattern.

When crafting microcopy, think of the interface as a dialog between your product and your user, where:

  • Titles, body text, tooltips, and so on are your “phrases.”
  • Button labels, input fields, toggles, menu items, and other elements that can be tapped or selected are the user’s “phrases.”

Ideally, you should be able to role-play your interface copy: a product asks the user to do something — the user does it; a product asks for information — the user types it in or selects an item from the menu; a product informs or warns the user about something — the user takes action.

For example, if your screen is devoted to an event and the CTA is for the user to register, you should opt for a button label like “Save my spot” rather than “Save your spot.” This way, when a user clicks the button, it’s as if they are pronouncing the phrase themselves, which resonates with their thoughts and intentions.

Be Especially Transparent And Clear When It Comes To Sensitive Topics
Why it’s important: To build trust and loyalty towards your product.

Some topics, such as personal data, health, or money, are extremely sensitive for people. If your product involves any limitations, peculiarities, or possible negative outcomes related to these sensitive topics, you should convey this information clearly and unequivocally. You will also need to collaborate with your UX/UI Designer closely to ensure you deliver this information in a timely manner and always make it visible without requiring the user to take additional actions (e.g., don’t hide it in tooltips that are only shown by tapping).

Here’s a case from my work experience. For quite some time, I’ve been checking homework assignments for a UX writing course. In this course, all the tasks have revolved around an imaginary app for dog owners. One of the tasks students worked on was creating a flow for booking a consultation with a dog trainer. The consultation had to be paid in advance. In fact, the money was blocked on the user’s bank card and charged three hours before the consultation. That way, a user could cancel the meeting for free no later than three hours before the start time. A majority of the students added this information as a tooltip on the checkout screen; if a user didn’t tap on it, they wouldn’t be warned about the possibility of losing money.

In a real-life situation, this would cause immense negativity from users: they may post about it on social media, and it will show the company in a bad light. Even if you occasionally resort to dark patterns, make sure you can afford any reputational risks.

So, when creating microcopy on sensitive topics:

  • Be transparent and honest about all the processes and conditions. For example, you’re a fintech service working with other service providers. Because of that, you have fees built into transactions but don’t know the exact amount. Explain to users how the fees are calculated, their approximate range (if possible), and where users can see more precise info.
  • Reassure users that you’ll be extremely careful with their data. Explain why you need their data, how you will use it, store and protect it from breaches, and so on.
  • If some restrictions or limitations are implied, provide options to remove them (if possible).

Ensure That The Button Label Accurately Reflects What Happens Next
Why it’s important:
  • To make your interface predictable, trustworthy, and reliable;
  • To prevent user frustration.

The button label should reflect the specific action that occurs when the user clicks or taps it.

It might seem valid to use a button label that reflects the user’s goal or target action, even if it actually happens a bit later. For example, if your product allows users to book accommodations for vacations or business trips, you might consider using a “Book now” button in the booking flow. However, if tapping it leads the user to an order screen where they need to select a room, fill out personal details, and so on, the accommodation is not booked immediately. So you might want to opt for “Show rooms,” “Select a rate,” or another button label that better reflects what happens next.

Moreover, labels like “Buy now” or “Book now” might seem too pushy and even off-putting (especially when it comes to pricey products involving a long decision-making process), causing users to abandon your website or app in favor of ones with buttons that create the impression they can browse peacefully for as long as they need. You might want to let your users “Explore,” “Learn more,” “Book a call,” or “Start a free trial” first.

As a product manager or someone with a marketing background, you might want to create catchy and fancy button labels to boost conversion rates. For instance, when working on an investment app, you might label a button for opening a brokerage account as “Become an investor.” While this might appeal to users’ egos, it can also come across as pretentious and cheap. Additionally, after opening an account, users may still need to do many things to actually become investors, which can be frustrating. Opt for a straightforward “Open an account” button instead.

In this regard, it’s better not to promise users things that we can’t guarantee or that aren’t entirely up to us. For example, in a flow that includes an OTP password, it’s better to opt for the “Send a code” button rather than “Get a code” since we can’t guarantee there won’t be any network outages or other issues preventing the user from receiving an SMS or a push notification.

Finally, avoid using generic “Yes” or “No” buttons as they do not clearly reflect what happens next. Users might misread the text above or fail to notice a negation, leading to unexpected outcomes. For example, when asking for a confirmation, such as “Are you sure you want to quit?” you might want to go with button labels like “Quit” and “Stay” rather than just “Yes” and “No.”

Tip: If you have difficulty coming up with a button label, this may be a sign that the screen is poorly organized or the flow lacks logic and coherence. For example, a user has to deal with too many different entities and types of tasks on one screen, so the action can’t be summarized with just one verb. Or perhaps a subsequent flow has a lot of variations, making it hard to describe the action a user should take. In such cases, you might want to make changes to the screen (say, break it down into several screens) or the flow (say, add a qualifying question or attribute earlier so that the flow would be less branching).
Make It Clear To The User Why They Need To Perform The Action
Why it’s important:
  • To create transparency and build trust;
  • To boost conversion rates.

An ideal interface is self-explanatory and needs no microcopy. However, sometimes, we need to convince users to do something for us, especially when it involves providing personal information or interacting with third-party products.

You can use the following formula: “To [get this], do [this] + UI element to make it happen.” For example, “To get your results, provide your email,” followed by an input field.

It’s better to provide the reasoning (“to get your results”) first and then the instructions (“provide your email” ): this way, the guidance is more likely to stick in the user’s memory, smoothly leading to the action. If you reverse the order — giving the instructions first and then the reasoning — the user might forget what they need to do and will have to reread the beginning of the sentence, leading to a less smooth and slightly hectic experience.

Ensure The UI Element Copy Doesn’t Explain How To Interact With This Very Element
Why it’s important:
  • If you need to explain how to interact with a UI element, it may be a sign that the interface is not intuitive;
  • Risk omitting or not including more important, useful text.

Every now and then, I come across meaningless placeholders or excessive toggle copy that explains how to interact with the field or toggle. The most frequent example is the “Search” placeholder for a search field. Occasionally, I see button labels like “Press to continue.”

Mobile and web interfaces have been around for quite a while, and users understand how to interact with buttons, toggles, and fields. Therefore, explanations such as “click,” “tap,” “enter,” and so on seem excessive in most cases. Perhaps it’s only with a group of checkboxes that you might add something like “Select up to 5.”

You might want to add something more useful. For example, instead of a generic “Search” placeholder for a search field, use specific instances a user might type in. If you’re a fashion marketplace, try placeholders like “oversized hoodies,” “women’s shorts,” and so on. Keep in mind the specifics of your website or app: ensure the placeholder is neither too broad nor too specific, and if a user types something like you’ve provided, their search will be successful.

Stick To The Rule “1 Microcopy Item = 1 Idea”
Why it’s important:
  • Not to create extra cognitive load, confusion, or friction;
  • To ensure a smooth and simple experience.

Users have short attention spans, scan text instead of reading it thoroughly, and can’t process multiple ideas simultaneously. That’s why it’s crucial to break information down into easily digestible chunks instead of, for example, trying to squeeze all the restrictions into one tooltip.

The golden rule is to provide users only with the information they need at this particular stage to take a specific action or make a decision.

You’ll need to collaborate closely with your designer to ensure the information is distributed over the screen evenly and you don’t overload one design element with a lot of text.

Be Careful With Titles Like “Done,” “Almost There,” “Attention,” And So On
Why it’s important:
  • Not to annoy a user;
  • To be more straightforward and economical with users’ time;
  • Not to overuse their attention;
  • Not to provoke anxiety.

Titles, written in bold and larger font sizes, grab users’ attention. Sometimes, titles are the only text users actually read. Titles stick better in their memory, so they must be understandable as a standalone text.

Titles like “One more thing” or “Almost there” might work well if they align with a product’s tone of voice and the flows where they appear are cohesive and can hardly be interrupted. But keep in mind that users might get distracted.

Use this quick check: set your design aside for about 20 minutes, do something else, and then open only the screen for which you’re writing a title. Is what happens on this screen still understandable from the title? Do you easily recall what has or hasn’t happened, what you were doing, and what should be done next?

Don’t Fall Back On Abstract Examples
Why it’s important:
  • To make the interface more precise and useful;
  • To ease the navigation through the product for a user;
  • To reduce cognitive load.

Some products (e.g., any B2B or financial ones) involve many rules and restrictions that must be explained to the user. To make this more understandable, use real-life examples (with specific numbers, dates, and so on) rather than distilling abstract information into a hint, tooltip, or bottom sheet.

It’s better to provide explanations using real-life examples that users can relate to. Check with engineers if it’s possible to get specific data for each user and add variables and conditions to show every user the most relevant microcopy. For example, instead of saying, “Your deposit limit is $1,000 per calendar month,” you could say, “Until Jan 31, you can deposit $400 more.” This relieves the user of unnecessary work, such as figuring out the start date of the calendar month in their case and calculating the remaining amount.

Try To Avoid Negatives
Why it’s important:
  • Not to increase cognitive load;
  • To prevent friction.

As a rule of thumb, it’s recommended to avoid double negatives, such as “Do not unfollow.” However, I’d go further and advise avoiding single negatives as well. The issue is that to decipher such a message, a user has to perform an excessive logical operation: first eliminating the negation, then trying to understand the gist.

For example, when listing requirements for a username, saying “Don’t use special characters, spaces, or symbols” forces a user to speculate (“If this is not allowed, then the opposite is allowed, which must be…”). It can take additional time to figure out what falls under “special characters.” To simplify the task for the user, opt for something like “Use only numbers and letters.”

Moreover, a user can easily overlook the “not” part and misread the message.

Another aspect worth noting is that negation often seems like a restriction or prohibition, which nobody likes. In some cases, especially in finance, all those don’ts might be perceived with suspicion rather than as precaution.

Express Action With Verbs, Not Nouns
Why it’s important:
  • To avoid wordiness;
  • To make text easily digestible.

When describing an action, use a verb, not a noun. Nouns that convey the meaning of verbs make texts harder to read and give off a legalistic vibe.

Here are some sure signs you need to paraphrase your text for brevity and simplicity:

  • Forms of “be” as the main verbs;
  • Noun phrases with “make” (e.g., “make a payment/purchase/deposit”);
  • Nouns ending in -tion, -sion, -ment, -ance, -ency (e.g., cancellation);
  • Phrases with “of” (e.g., provision of services);
  • Phrases with “process” (e.g., withdrawal process).
Make Sure You Use Only One Term For Each Entity
Why it’s important: Not to create extra cognitive load, confusion, and anxiety.

Ensure you use the same term for the same object or action throughout the entire app. For example, instead of using “account” and “profile” interchangeably, choose one and stick to it to avoid confusing your users.

The more complicated and/or regulated your product is, the more vital it is to choose precise wording and ensure it aligns with legal terms, the wording users see in the help center, and communication with support agents.

Less “Oopsies” In Error Messages
Why it’s important:
  • Not to annoy a user;
  • To save space for more important information.

At first glance, “Oops” may seem sweet and informal (yet with an apologetic touch) and might be expected to decrease tension. However, in the case of repetitive or serious errors, the effect will be quite the opposite.

Use “Oops” and similar words only if you’re sure it suits your brand’s tone of voice and you can finesse it.

As a rule of thumb, good error messages explain what has happened or is happening, why (if we know the reason), and what the user should do. Additionally, include any sensitive information related to the process or flow where the error appears. For example, if an error occurs during the payment process, provide users with information concerning their money.

No Excessive Politeness
Why it’s important: Not to waste precious space on less critical information.

I’m not suggesting we remove every single “please” from the microcopy. However, when it comes to interfaces, our priority is to convey meaning clearly and concisely and explain to users what to do next and why. Often, if you start your microcopy with “please,” you won’t have enough space to convey the essence of your message. Users will appreciate clear guidelines to perform the desired action more than a polite message they struggle to follow.

Remove Tech Jargon
Why it’s important:
  • To make the interface understandable for a broad audience;
  • To avoid confusion and ensure a frictionless experience.

As tech specialists, we’re often subject to the curse of knowledge, and despite our efforts to prioritize users, tech jargon can sneak into our interface copy. Especially if our product targets a wider audience, users may not be tech-savvy enough to understand terms like “icon.”

To ensure your interface doesn’t overwhelm users with professional jargon, a quick and effective method is to show the interface to individuals outside your product group. If that’s not feasible, here’s how to identify jargon: it’s the terminology you use in daily meetings among yourselves or in Jira task titles (e.g., authorization, authentication, and so on), or abbreviations (e.g., OTP code, KYC process, AML rules, and so on).

Ensure That Empty State Messages Don’t Leave Users Frustrated
Why it’s important:
  • For onboarding and navigation;
  • To increase discoverability of particular features;
  • To promote or boost the use of the product;
  • To reduce cognitive load and anxiety about the next steps.

Quite often, a good empty state message is a self-destructing one, i.e. one that helps a user to get rid of this emptiness. An empty state message shouldn’t just state “there’s nothing here” — that’s obvious and therefore unnecessary. Instead, it should provide users with a way out, smoothly guiding them into using the product or a specific feature. A well-crafted empty message can even boost conversions.

Of course, there are exceptions, for example, in a reactive interface like a CRM system for a restaurant displaying the status of orders to workers. If there are no orders in progress and, therefore, no corresponding empty state message, you can’t nudge or motivate restaurant workers to create new orders themselves.

Place All Important Information At The Beginning
Why it’s important:
  • To keep the user focused;
  • Not to overload a user with info;
  • Avoid information loss due to fading or cropping.

As mentioned earlier, users have short attention spans and often don’t want to focus on the texts they read, especially microcopy. Therefore, ensure you place all necessary information at the beginning of your text. Omit lead-ins, introductory words, and so on. Save less vital details for later in the text.

Ensure Title And Buttons Are Understandable Without Body Text
Why it’s important:
  • For clarity;
  • To overcome the serial position effect;
  • To make sure the interface, the flow, and the next steps are understandable for a user even if they scan the text instead of reading.

There’s a phenomenon called the serial position effect: people tend to remember information better if it’s at the beginning or end of a text or sentence, often overlooking the middle part. When it comes to UX/UI design, this effect is reinforced by the visual hierarchy, which includes the bigger font size of the title and the accentuated buttons. What’s more, the body text is often longer, which puts it at risk of being missed. Since users tend to scan rather than read, ensure your title and buttons make sense even without the body text.

Wrapping up

Trying to find the balance between providing a user with all the necessary explanations, warnings, and reasonings on one hand and keeping the UI intuitive and frictionless on the other hand is a tricky task.

You can facilitate the process of creating microcopy with the help of ChatGPT and AI-based Figma plugins such as Writer or Grammarly. But beware of the limitations these tools have as of now.

For instance, creating a prompt that includes all the necessary details and contexts can take longer than actually writing a title or a label on your own. Grammarly is a nice tool to check the text for typos and mistakes, but when it comes to microcopy, its suggestions might be a bit inaccurate or confusing: you might want to, say, omit articles for brevity or use elliptical sentences, and Grammarly will identify it as a mistake.

You’ll still need a human eye to evaluate the microcopy &mdahs; and I hope this checklist will come in handy.

Microcopy Checklist

General

✅ Microcopy is role-playable (titles, body text, tooltips, etc., are your “phrases”; button labels, input fields, toggles, menu items, etc. are the user’s “phrases”).

Information presentation & structure

✅ The user has the exact amount of information they need right now to perform an action — not less, not more.
✅ Important information is placed at the beginning of the text.
✅ It’s clear to the user why they need to perform the action.
✅ Everything related to sensitive topics is always visible and static and doesn’t require actions from a user (e.g., not hidden in tooltips).
✅ You provide a user with specific information rather than generic examples.
✅ 1 microcopy item = 1 idea.
✅ 1 entity = 1 term.
✅ Empty state messages provide users with guidelines on what to do (when possible and appropriate).

Style

✅ No tech jargon.
✅ No excessive politeness, esp. at the expense of meaning.
✅ Avoid or reduce the use of “not,” “un-,” and other negatives.
✅ Actions are expressed with verbs, not nouns.

Syntax

✅ UI element copy doesn’t explain how to interact with this very element.
✅ Button label accurately reflects what happens next.
✅ Fewer titles like “done,” “almost there,” and “attention.”
✅ “Oopsies” in error messages are not frequent and align well with the brand’s tone of voice.
✅ Title and buttons are understandable without body text.