m

Trip to Mazirbe

At the very last day of last year (2017) I took an offer to go to Mazirbe – an old fishermen village, located on coast of Baltic sea, West part of Latvia. Trip turned around to be very nice. And I got some nice shots, too.

See rest of photos from trip to Mazirbe.













m

No longer an Underdog, Sony cameras and lenses win multiple categories at TIPA 2022 World Awards

The Technical Image Press Association, otherwise known as TIPA, has just released its list of...

The post No longer an Underdog, Sony cameras and lenses win multiple categories at TIPA 2022 World Awards appeared first on Alphatracks.




m

Tidy Birds and Neat Bees: on Conscientiousness in Animals

By Mikel Maria Delgado Aeon Human personality theory has long revolved around what we know as the ‘Big Five’ – five dimensions of personality that cover a large swathe of how humans behave across time and contexts. These dimensions are … Continue reading





m

The Bartlett Summer Show 2020

The Bartlett School of Architecture celebrates the work of 700 students with a virtual Summer Show exhibition featuring 32 3D exhibition rooms of ambitious and creative student work




m

M-trust Co.,Ltd. Corporate

M-trust Co.,Ltd. is a company with high-skilled professionals who solve social issues from the real estate business.




m

Nahel Moussi – Portfolio

Nahel Moussi is a Freelance Product Designer. Discover her work and get in touch if you want to collab.




m

How Generative AI Can Add Human Delight to Your Virtual Event

We just celebrated 24 years of Viget. That’s two dozen years! This year, our Spring TTT in celebration of “Viget24” was a virtual extravaganza. We’ve put on a lot of virtual events over the years. Some with really strong themes and swag bags; some that focus on simple, meaningful time together; and others that let us enjoy learning something new as a team. Regardless of the rest of the experience, a key component of all of our virtual events is joyachieved often through intentional levity. We think it’s important to laugh together! We see laughter as a way to expedite connection, and connection leads to rapport which makes us better at collaborating — and in turn leads to more quality products for our clients. 

Experimenting and iterating is a critical way we try to continually get delight right. We’re pretty pleased with one of our experiments from Viget24 that we called “Lovely Spring Day”.

A Lovely Spring Day

As we were brainstorming for this TTT, we thought about how to throw some joyful levity pizzazz into the pieces of our virtual events puzzle that have become pretty standard. How do we add lots of delight without adding lots of time to the action-packed schedule? We zeroed in on the virtual backgrounds we’ve been creating for every event — they add a layer of specialness. Of place. This isn’t any old virtual meeting. This is a TTT! 

A small collection of past event-specific virtual backgrounds

Another key consideration for our team is figuring out creative ways to tie in inspiration from our industry and our work. AI has been an obvious contender —  we’ve discussed it and tied it in to some extent for the past several TTTs. But this time, we wanted to see how we could use AI for delight — marrying it with virtual backgrounds felt obvious. And so, a ”Lovely Spring Day” was born. 

The TL;DR is that we generated custom virtual backgrounds for every Viget employee that encapsulates their “ideal spring day.” We then played a 15-minute guessing game where people tried to guess who the background “belonged to.” Then, people had access to the full folder of AI-generated virtual backgrounds to look through. Vigets could then choose the background that spoke to them most and set it as their background. 

Read on for more on how we put this together!

Pre-Event Survey

To support all of our TTTs, we send out thoughtful pre-event logistics surveys 2-3 weeks before the big day. The survey lets us know where folks are joining from (where can we send their activity + snack packages?) and gives folks a chance to provide input on how the People Team can help folks enjoy and be present for TTT. This time, we also snuck in three questions, just “for giggles.”

  • In one sentence, describe your ideal spring day.
  • List three things that spark joy.
  • What color do you think suits you best?

We did not share why we asked these questions. Sneaky, sneaky! When it’s low-key like this, the element of surprise is often a quick way to level up the delight.

Asking for a Friend

With rich data in hand about what makes people happy in spring, we were ready to generate the backgrounds. I was stoked! I’ve been experimenting with ChatGPT for some time, so it was fun to be able to use the DALL-E 3 side of OpenAI’s GPT-4 model

Who knew Prompt Engineering would be part of my role as a recruiter-who-helps-support-TTT-planning? I played around with a couple different prompts to generate these background images. Ultimately, my goal was to create backgrounds that were meaningfully different from one another but still felt good (i.e., something you might feasibly want to set as your virtual background and nothing freakily AI, like uncanny valley hands).

Here are the prompts I landed on that got me to our set of virtual backgrounds:

  • Please generate an image (dimensions of a virtual meeting background) that encapsulates the vibe of a day with [ BLANK ].
  • Please generate an image (dimensions of a virtual meeting background) that features [ BLANK ].

In the blanks, I wrote the things people included in their surveys. Those blanks were filled with everything ranging from dogs, cats, and friends to beverages, specific temperatures, yard games, carbohydrates, hammocks and more! Sometimes, I’d include a detail I knew about that person myself, even if it wasn’t in their survey. Yes, I occasionally editorialized for both clarity and whimsy! This was for delight purposes, but also helped serve my goal of having the backgrounds be “meaningfully different from one another.” It’s amazing how many people’s ideal spring day is as simple as having 1) moderate temperatures and 2) no pollen!

I generated 55 images. Throughout the process, DALL-E nailed it. I only needed to regenerate 2 or 3 images with clarifiers (and only because they included AI-specific outliers like disembodied hands). Huzzah!

Here are some of my favorites, along with their prompts in the captions. Can you guess who they belong to?

Please generate an image (dimensions of a virtual meeting background) that features an outdoor brewery/taproom in the appalachian mountains. There's a playground with kids in the very distance. In the foreground, frisbee, soccer, volleyball, etc. with friends and family.
Please generate an image that encapsulates the vibe of a day ending with an outdoor dinner with lights near an outdoor shower. There should be some hiking boots scattered about.
Please generate an image that features a nice hot bath after a cold but sunny day, with a beautiful mug of green tea and a box of takeout that looks really good. The calendar shows April 25th.
Please generate an image that encapsulates the vibe of sitting outside in a nice purple adirondack chair with buc-ees paraphernalia around.
Please generate an image that encapsulates the vibe of a sunny, 65 degree day with a slight breeze at the ballpark watching a game. The image should feature cats, baseball, and art.
Please generate an image that encapsulates the vibe of being outside in a canoe along with carbs, bad jokes, and games (video OR board games).
Please generate an image that features endless mountain bike trails, a blue bike with a cup of coffee in the cupholder, and roaming cats.

IRL

Ok, so for the actual activity we had the images ready to go in a private Google Folder. I took twelve of the images and put them in a very simple deck. I shared my screen, introduced the activity, and invited people to guess who they think each image belonged to in Slack. It was so fun seeing people throw out guesses and then narrow in with any verbal hints I gave!

Each image took about a minute. Then, we shared access to the Google Folder, gave folks a couple minutes to choose a background that called to them (their own image or someone else’s), and set it as their background. It felt like a magical moment to witness people finding and resonating with their own image or delighting in the ridiculousness of their coworkers’. We saved about 5 minutes for this piece, which felt right.

The whole Lovely Spring Day activity took just over 15 minutes! It was a perfect way to transition from a long meal break into our next grouping of content. And, we got to see the different backgrounds throughout the rest of the meeting.

Oh, the humanity!

I think this activity was successful for a couple of reasons.

1. People laughed! 

Color commentary in the #ttt Slack channel

2. People felt seen. Some of these backgrounds were incredibly on point. Some of that was due to key folks having well-documented interests and a Slack-Famous Dog. 

Laura Sweltz has a famous love of books and an incredibly iconic beagle named Phoebe.

But some of it was due to the People Team knowing about our people — our coworkers — beyond the sentence they wrote in. This uniquely human involvement helped me call an audible as needed and tweak prompts slightly to make the backgrounds feel even more relatable.

Steven, Carolyn, and Laura Sweltz felt seen.

3. We could commiserate about our eventual AI overlords. (Did you notice that I say “please” in my prompts?!) Listen, Viget has plenty of practical, healthily skeptical people who are dubious about AI. GenAI is not always a fun, lighthearted thing. But using it in a fun, lighthearted way to do something it’s really good at was a nice use case and thought-provoking exposure even for people who are not into it.

4. We could see where we all align, and where we differ! It was amazing to see just how many people love picnics, covet their caffeine, and appreciate a bike ride. It was also cool to see some unique folks who simply crave a rainy spring day, or some beloved Buc-ee’s. What a rich tapestry of individuals — literally!




m

Building Magic with Webflow: A UI Developer's Perspective

In the fast moving and constantly changing landscape of web development, codeless solutions like Webflow and Squarespace have emerged as an alternative to more traditional development. These platforms allow users to design and build websites through intuitive visual interfaces, and are viable solutions for many use cases out there. 

For the past several months, I've been working as a frontend development support specialist alongside one of our talented designers, Blair Culbreth, who is managing a large, established Webflow project. Here are my candid thoughts and impressions from this experience, along with some critical considerations for those looking to integrate Webflow into their own workflow. Spoiler alert: while Webflow has some impressive strengths, it also comes with limitations that can be both unexpected and frustrating at times.

What Webflow Does Really Well

Small Team Efficiency

Webflow truly shines for smaller teams or products, especially those with limited resources. For a team that’s just a single designer or a small development crew, Webflow can help lower the technical debt involved with getting a website to production. By mitigating some of the more complex aspects of development such as responsive design, cross-browser compatibility, and hosting, teams are able to focus on other aspects of the site. This makes it a strong option for startups, freelancers, or small businesses looking to create professional-grade websites efficiently and effectively without the necessity of a developer.

Animation Tooling

When I say professional-grade websites, I’m talking about more than just functional designs. Webflow has some fantastic animation tooling making it incredibly simple to build rich, full-page animations and interactions without ever touching a line of code. Users can create scroll-bound animations or interactive moments of joy all from the comfort of a relatively simple and straightforward GUI. Through the use of animation keyframes, you can elevate a static site into something that feels modern and expensive. Heck, I could even see using the animation tooling itself as a prototyping tool for design handoff in a more traditional web development process. This ability to easily add sophisticated animations allows smaller teams to produce polished, dynamic websites that rival those created by much larger teams with dedicated development resources.

Documentation & Education

Beyond its design capabilities, Webflow also stands out for its educational impact. The platform offers incredible documentation that covers core frontend principles, effectively bridging the divide between design and development. Through simple, digestible, and intuitive videos and written documentation, Webflow equips designers with knowledge that shores up many concepts and intricacies of web development.

Working with Webflow provides designers with numerous takeaways they can apply to future projects, including those outside the realm of Webflow. The platform educates users on HTML structureCSS styling properties, and responsive design. This deeper understanding of web development makes designers more versatile and effective in their roles and inherently benefits communication between designers and developers, as their thinking will be more aligned with one another.

Navigating Webflow’s Limitations

Class Styles

Webflow's class-based styling system is a standout feature, especially to those familiar with CSS. It allows you to bundle properties into classes and apply them efficiently across different elements, minimizing code duplication. When used effectively, this approach facilitates the creation of reusable styles and design systems; however, mastering it requires attention to detail, similar to working with CSS directly, which can be made challenging within the Webflow UI.

Due to the separation of pages and content in Webflow, tracking down existing CSS classes and applying styles consistently throughout a project can be challenging. Keeping track of which class names apply what styles can be a struggle. While Webflow offers a Style Manager to help organize and manage classes, it can be difficult to use for quickly identifying how styles are being applied across the platform.

Moreover, the inability to open multiple pages in designer mode at once presents a significant frustration. Without the ability to compare elements across different pages simultaneously, users may face challenges in ensuring consistency and troubleshooting design issues efficiently. This limitation may lead to a slower, more cumbersome workflow, particularly in larger projects where maintaining a coherent design system is critical.

Another struggle with managing styles within the UI comes in the form of applying styles to combo classes. Combo classes are when you combine multiple classes together to create a variation or modified state of an element. Inadvertently applying styles to a combo class when intending to apply a style for the base class was a common issue I found myself running into, highlighting some challenges users should be aware of, especially when getting more familiar with Webflow.

These challenges underscore the value of implementing a strong and consistent CSS class naming system, such as BEM (Block Element Modifier). Adhering to a standardized naming convention will help mitigate some of the challenges posed by Webflow's class-based styling system, but it does come with the added overhead of needing to learn a new class naming convention.

Preset Web Elements

Webflow provides users with a diverse selection of default web elements, ranging from simple divs to intricate lightbox elements, which serve as the foundational building blocks for websites. These preset elements occasionally impose rigid structural constraints. For instance, when attempting to create a tabs menu with a filter, users may encounter a problem with adding additional elements to the tab menu block. This restriction forces users to either conform their design to Webflow’s constraints or devise creative workarounds to achieve their desired functionality.

Navigating such limitations can be challenging, particularly when striving to realize a specific design vision. It may involve exploring alternative solutions or compromising on the original plan. Yet, as users gain familiarity with the platform, those limitations can be anticipated, allowing them to develop strategies to circumvent the constraints.

Custom Scripts

One of the most powerful aspects of Webflow is also one of the most challenging features to balance. It requires careful management to avoid issues like performance degradation and increased technical debt.  It’s incredibly easy to have a website get bogged down with bloat, especially when a larger team might be working on a project.

Webflow lacks a built-in feature to view all custom scripts at a glance, making it difficult to track and manage them. Maintaining a documented list of all custom scripts used in your project and detailing their purposes and locations can help mitigate this issue, but that’s a fair amount of overhead to maintain. Additionally, custom scripts do not function in Webflow’s editor mode, requiring a site deploy for testing and troubleshooting, which can be time-consuming. 

The ability to add custom scripts opens up a world of options, including third-party plugins and libraries that can expand Webflow's native features. Tools like Jetboost or Finsweet can help fill in the gaps, and are oftentimes worth the investment as they provide relatively easy-to-use integrations that will make for a better user experience.

That’s all to say that applying custom scripts to a Webflow project is not necessarily bad, but should be approached with considerations on how to mitigate technical debt. Here are a few suggestions to help with integrating custom scripts into your Webflow project:

  • Maximize Native Features: Use Webflow’s built-in features as much as possible. If a design can be achieved with Webflow’s interactions and animations, avoid adding custom JavaScript.
  • External Development: Develop and test scripts in an external environment to reduce time spent deploying and debugging within Webflow.
  • Reusable Components: Save frequently used custom code as reusable components to simplify maintenance and ensure consistency across the site.
  • Regular Audits: Periodically review and clean up scripts to ensure that only necessary ones are loaded, improving site performance and maintainability.

Mitigating Difficulty Through Teamwork

I started this article by mentioning that I recently served as a frontend development support specialist alongside our designer, Blair, on this project. Blair took on the primary responsibility of building many of the pages, and I want to share more about our collaborative experience. Webflow is as close as you can get to building a traditionally coded website without necessarily needing to touch code, but that doesn’t mean there’s no value in having someone more familiar with the technical side of website building available. From accessibility considerations to complex layout structures, a lot of time can be saved by having a developer serve as a pseudo consultant on the project.

On numerous occasions, Blair reached out to me to help set up more complex custom implementations that required JavaScript or weren’t coming together as expected. By being able to jump in and solve those issues quickly for Blair, she was able to focus on building out the other pages. Similarly, I was able to audit and review her work to ensure it was inclusive for all types of users.

There are various development tricks we can implement to enhance user experiences for visually impaired users. For example, hiding text specific to a screen reader to provide greater context is a technique that a designer might not generally think about or even be aware of, but a good frontend developer would know to include. By being involved in the building process, I was able to highlight and advise on such instances, ensuring our project was accessible and user-friendly for everyone.

Conclusion

Webflow presents a robust solution for web development, particularly for smaller teams or projects with limited resources. Its intuitive visual interface and powerful animation tools enable the creation of professional-grade websites without the need for extensive coding knowledge. Webflow’s educational resources also empower designers to deepen their understanding of web development, bridging the gap between design and development and fostering better collaboration.

Webflow is not without its limitations. The class-based styling system, while efficient, can be challenging to manage, and the need for site deployment to test custom scripts adds to both the complexity and time investment required to build a project. Despite these challenges, many of the difficulties can be mitigated through careful planning and teamwork. Leveraging native features, developing and testing scripts externally, and creating reusable components are all strategies that can help maintain site performance and manage technical debt.

Collaborative efforts between designers and developers can further enhance the process, as seen in my experience working alongside Blair. This teamwork allows for efficient problem-solving and ensures that accessibility and user experience are prioritized throughout the project. By combining the strengths of Webflow with thoughtful collaboration and strategic planning, teams can create dynamic, user-friendly websites that meet modern standards.




m

Balancing Image Speed and Quality with imgix

Users expect a website to load fast. An average web page loads in about 2.5 seconds. The longer the user has to wait, the higher the user bounce rate. There are a lot of factors that go into site speed, but images account for about 75% of the page weight on an application or website. Google’s Core Web Vitals uses several metrics to rank sites. Visual site speed or largest contentful paint affects ROI as slower sites have fewer repeat users and fewer sales.

Without properly sized images, both site speed and image quality are affected. Accordingly, we use several methods to deliver properly sized images. Our primary solution is imgix because it is easy to implement and saves managers and clients time and effort. 

Imgix Key Features

Imgix provides a lot of features — some we consistently use on projects, and others we use in very specific situations. 

Responsive Images

Setting up responsive images can be complex. As the variety of devices and their screen resolutions continue to expand, managing all the different image requirements is increasingly challenging.

Consider this scenario: a website’s images look crisp and clear on a high-resolution monitor. When that same page is viewed on a mobile device, the images are so large the page takes forever to load. A solution could be to upload a smaller image for mobile, right? It's not quite that simple. We need eight or more different sizes of the same image to account for different screen sizes and retina screens. Keeping track of all the image sizes and saving each size gets complex and would be nearly impossible to do manually on a site that has hundreds or thousands of images. 

One of our clients, National Park Foundation (NPF), wanted to clarify its message to better target major donors. Their gorgeous, large scenic images are essential to their website strategy.  NPF needed the images throughout their site to be crisp and clear at all screen sizes. Using imgix, NPF content managers can load high-resolution images to the CMS and not worry about the site's speed or performance. They rely on imgix to deliver the correctly resized image for any user's screen.

Imgix does this with their Device Pixel Ratio and Client Hints which automatically sets the pixel density for the image based on the user's device. Those API parameters can be easily set in the URLs for the image’s `srcset`. This allows developers to set an image width for an image `srcset` and then imgix delivers the right pixel ratio image to the user. We use `srcset` with imgix on other client sites like Bezos Earth Fund and Human Rights Campaign as well.

Resize and Cropping

Imgix allows you to crop images in addition to setting an image’s focal point. So, only one image needs to be uploaded and it can be used at multiple sizes and croppings throughout the site. Let's say we upload a large landscape image, but on some pages we only need to use a portion of the image cropped as a square. Imgix will crop the image and deliver the smaller versions on the pages we need while persisting the larger versions on other pages.

At Viget we use resizing and cropping on our own website, including our articles, to crop the staff photo to a smaller size at the top of the articles. This makes it possible for us to upload the staff photo once and the article image gets created automatically. 

Color Palette 

Another feature that we've used on client sites is the Color Palette API which allows you as many colors as you want from an image. For example, the Shedd Aquarium website that we built uses this feature by pulling a vibrant color from the image and setting it as the background color for the page hero. Aside from taking the manual work out of closely aligning photography with a page’s design, there’s an additional benefit: if you are on a slow connection, you will see a dynamic colored banner at the top before the image loads.

Image Upscaling

Another valuable feature is the ability to upscale images. Even if you upload an image that is low resolution, it can still be used at a higher resolution. This is especially useful for e-commerce sites or applications where users are uploading their images.  The upscale feature uses Generative AI to take a pixelated image and create a higher-resolution image. The final image will not be perfect, but it looks more professional. See the upscale demo on imgix.

Non-upscaled image
Upscaled image using Imgix

PDF Preview Images

There is also a PDF page to image option in imgix. The API enables the generation of a page-specific image preview from the PDF, which can serve as both a thumbnail and a full-size preview. When we built AHIP.org, they had a resources section for their members containing quite a few PDFs. To help with clarity and findability, we used imgix to show previews of the PDF documents to non-members. This feature allows AHIP to upload resource PDFs without having to also upload any thumbnail images. 

Face Detection

Another nice feature is a face detection parameter that you can pass to the API. This allows you to upload a photo and no matter the cropping or size it will keep the face as the focal point of the image. We used this feature on NEA for their team member page. It's great for user profile images that are used in different contexts throughout the site. 

Video Streaming

Videos have become a key design element on websites. However, determining which service to use for embedding those videos is an ongoing topic of discussion. Video platforms enable you to integrate the video onto the page, yet they introduce scripts that may impede page loading speed. Imgix offers a video embed service that allows content managers to keep all the images and videos in one place. The videos are automatically encoded to Adaptive Bitrate Streaming to get the best compression and video quality. So, videos load fast and look great on mobile and desktop. 

Imgix Video API with Adaptive Bitrate Streaming

Performance 

A lot of CMSs have image transformations built in. An image transformation encompasses everything for that image including responsive sizes, cropping, resizing, and face detection from the original. This is great for small sets of images, but transformations quickly get out of hand the more images there are on a site. For example, the homepage of the National Park Foundation has a minimum of 96 image transformations. 

Processing all of those image transformations uses a lot of server resources. Imgix saves the images and delivers them through their CDN. The imgix image CDN has an average of 0.15 milliseconds return on requests which enables images to load as quickly as possible. The CDN also caches the images on CDN edge nodes making them immediately available for future requests. 

Flexibility

Imgix is flexible enough to work with almost any site structure; including WordPress, Craft CMS, Shopify, React, Ruby on Rails, Python, and more (see the full list). So, whether a site is a WordPress site or a Rails application, imgix fits right into the ecosystem. And, even better: you don’t have to rebuild your web app or website to gain the benefits of image performance, which can save you a lot of time and money.

Setting up imgix on an existing website is easy. Imgix can connect to existing asset storage sources like AWS, Azure, or a web folder on the same domain. Once the image source is set up, a developer can start passing parameters to the API

Cost

Imgix is free for 1,000 images which makes it easy to integrate and grow with your site. Pricing goes to $750/yr for 5,000 images and $3,000/yr for 25,000 images. In their pricing structure, “images” are categorized as origin images, so the count only includes original images and not transformed ones. So, you could have hundreds of images and thousands of image transformations all being delivered through a CDN for free.

Conclusion

Ensuring fast site speed isn't just important. It is vital. It's the cornerstone of a successful online presence, directly influencing search engine rankings, user satisfaction, and ultimately, your return on investment. Properly sized and optimized images are key to ensuring your site loads quickly and displays correctly for users across various devices.

We have found that imgix enables our team to efficiently create projects with diverse image options, saving managers and developers valuable time. Our clients benefit from reduced server space and an increased site speed. Imgix’s API is comprehensive, so you can use one tool for all features and options around site images — from cropping and resizing to face detection and automated color palettes, to video and beyond. Having used imgix for the past five years to support the wide-ranging needs of our clients, we feel confident recommending it and using it again and again. 

Users expect a website to load fast, and imgix is a reliable way to make sure that happens. 




m

Handling Spelling Mistakes with Postgres Full Text Search

Background #

Postgres Full Text Search (FTS) is a great way to implement site search on a website running Postgres already, without requiring additional infrastructure.

On a recent engagement with a client, we were deciding between Postgres FTS and ElasticSearch. Ultimately we chose FTS because we could spin it up without having to add extra infrastructure, as we would with ElasticSearch.

Since the project was written in Ruby on Rails, we were able to use the excellent PgSearch gem to implement FTS in ActiveRecord.

Multisearch #

As we wanted a general site search, we needed to utilize multisearch. Multisearch combines multiple ActiveRecord models into one search 'document' table that you can search against. For example, if a user searches for some search term, and the search is configured for multisearch, then every single model that we mark as multisearchable will be searched for that term at the same time. See here for more detail.

Search Features #

PgSearch allows for different search features, tsearch, trigram, and dmetaphone. The default is tsearch, which uses the built-in Postgres Full Text Search.

This was great for our use case, since it also comes with highlighting, a feature that was required. The highlighting is from a field returned by Postgres FTS, where it returns the text around the search term for context and bolds the search terms.

Spelling Mistakes #

Unfortunately, tsearch does not handle misspelled words. However, as I mentioned before, PgSearch allows for other search features!

And trigram is a feature that can be installed via a Postgres extension (pg_trgm) that does just that.

Trigram #

  • The idea behind trigram search is to split pieces of text into sets of three-letter segments, and compare the sets to one another
  • If two trigram sets are similar enough, we assume there was a spelling mistake, and return the document with the correctly-spelled term.
  • As a quick example (ignoring whitespace): Consider the word Viget. Viget would make trigrams:
[vig, ige, get]
  • Now, consider our evil twin agency, Qiget. They would make trigrams
[qig, ige, get]
  • The two trigram sets match very closely, with only one of the trigrams not being the same. Thus, if we were to compare these with pg_trgm, we could reasonably tell that anyone typing 'Qiget' must have been actually looking for 'Viget', and just misspelled it.

Working Trigram into our existing solution #

PgSearch allows us to use multiple search features at once, so we can use tsearch and trigram side by side. Note that we cannot just replace tsearch with trigram due to needing some features in tsearch that are exclusive to it. Here is what an example configuration might look like.

PgSearch.multisearch_options = {
  using: {
    tsearch: {
      prefix: true,
      highlight: {
        MaxFragments: 1
      }
    },
    trigram: { 
      only: [:content]
    }
  }
}

Trigram (and timelines) causing issues #

While it was easy to slot Trigram into our multisearch, it caused a pretty serious performance hit. We were seeing 50x-75x slower searches with both features combined than with just tsearch. We needed to find a way to balance performance with handling misspellings

At the point that handling misspellings became prioritized, the entire search feature was almost fully QA'd and about ready to go out. There wasn't much time left in the budget to find a good solution for the issue.

This thread from the PgSearch repo sums it up pretty well – there were multiple other users that were/are having similar issues as we were. The top-rated comment in this thread is someone mentioning that the solution was to just use ElasticSearch ('top-rated' is doing a lot of heavy lifting. It did have the most likes...at two). We needed to find some sort of middle ground solution that we could act on quickly.

Postgres Documentation saves the day #

In the docs for the Trigram Postgres extension, the writers give an idea for using Trigram in conjunction with Full Text Search. The general idea is to create a separate words table that has a Trigram index on it.

Something like this worked for us. Note that we added an additional step with a temporary table. This was to allow us to filter out words that included non-alphabet characters.

execute <<-SQL
  -- Need to make a temp table so we can remove non-alphabet characters like websites
  CREATE TEMP TABLE temp_words AS
    SELECT word FROM ts_stat('SELECT to_tsvector(''simple'', content) FROM pg_search_documents');

  CREATE TABLE pg_search_words (
    id SERIAL PRIMARY KEY,
    word text
  );

  INSERT INTO pg_search_words (word)
    SELECT word
    FROM temp_words
    WHERE word ~ '^[a-zA-Z]+$';
  
  CREATE INDEX pg_words_idx ON pg_search_words USING GIN (word gin_trgm_ops);
  
  DROP TABLE temp_words;
SQL

This words table is therefore populated with every unique word that exists in your search content table. For us, this table was pretty large.

result = ActiveRecord::Base.connection.execute("SELECT COUNT(*) FROM pg_search_words").first['count']
puts result.first['count']
# => 1118644

Keeping the words table up-to-date #

As mentioned in the docs, this table is separate from your search table. Therefore, it needs to be either periodically regenerated or at least have any new words added to search content also added to this table.

One way to achieve this is with a trigger, which adds all new words (still filtering out non-alphabet characters) that are inserted into the documents table to the words table

create_trigger("pg_search_documents_after_insert_update_row_tr", generated: true, compatibility: 1)
  .on("pg_search_documents")
  .after(:insert, :update) do
  <<-SQL_ACTIONS
    CREATE TEMP TABLE temp_words AS
      SELECT word FROM ts_stat('SELECT to_tsvector(''simple'', ' || quote_literal(NEW.content) || ')');

    INSERT INTO pg_search_words (word)
      SELECT word
      FROM temp_words
      WHERE word ~ '^[a-zA-Z]+$';

    DROP TABLE temp_words;
  SQL_ACTIONS

end

Note that this does not handle records being deleted from the table – that would need to be something separate.

How we used the words table #

Assuming for simplicity the user's search term is a single word, if the search returns no results, we compare the search term's trigram set to the trigram index on the words table, and return the closest match.

Then, we'd show the closest match in a "Did you mean {correctly-spelled word}?" that hyperlinks to a search of the correctly-spelled word

Given more time, I would have liked to explore options to speed up the combined FTS and Trigram search. I'm certain we could have improved on the performance issues, but I can't say for sure that we could have gotten the search time down to a reasonable amount.

A future enhancement that would be pretty simple is to automatically search for that correctly-spelled word, removing the prompt to click the link. We could also change the text to something like "Showing results for {correctly-spelled word}".

Ultimately, I think with the situation at hand, we made the right call implementing Trigram this way. The search is just as fast as before, and now in the case of misspellings, a user just has to follow the link to the correctly-spelled word and they will see the results they wanted very quickly.




m

How we use DDEV, Vite and Tailwind with Craft CMS

In 2022 we changed our dev tooling for new Craft CMS projects. Goodbye complex esoteric Webpack configuration, hello Vite. Goodbye complex esoteric Docker Compose configuration, hello DDEV. This small change in tooling has completely transformed our development experience. We start work faster and avoid wasting billable time debugging Webpack and Docker.

From Webpack to Vite #

Webpack has been the defacto way of bundling JavaScript and front end assets. It’s a powerful tool… but with that great power comes great responsibility complexity.

Vite bills itself as the “next generation” of frontend tooling. Vite is much faster at bundling. But more importantly… its default configurations work great for most website projects.

Before (Webpack) #

Well over 300 lines of configuration spanning three files. Good luck making changes!

After (Vite) #

A crisp 30 - 50 lines of code. Want to switch to TypeScript? Need to drop in a popular front-end framework? Easy! All it takes is adding a plugin and 2-3 lines of config.

Deleting old code has never felt this good!

From Docker to DDEV #

Docker is another development staple. It isolates server infrastructure into virtual “containers.” This helps avoid issues that arise from each developer having a slightly different setup. However, Docker can have a learning curve. Config changes, PHP upgrades and unexpected issues often eat up precious project time.

Enter DDEV! DDEV describes itself as “Container superpowers with zero required Docker skills: environments in minutes, multiple concurrent projects, and less time to deployment.” We’ve found that statement to be 100% true.

Before (Docker) #

Every Craft project has a different Docker config. Bugs and upgrades required deep Docker experience. Last (but not least), it was difficult to run several projects at one time (ports often conflict).

After (DDEV) #

Performance is consistently better than our hand-rolled setup thanks to Mutagen and faster DB import/exports. Simultaneous projects run out of the box. DDEV provides (and maintains) a growing list of helpful shortcuts and DX features.

Getting started #

Ready to make the switch? Here’s how to set up DDEV, Vite and Tailwind on your own Craft project.

Show me the config files already! #

If you would rather see full config files instead of following step by step, check out our Craft Site Starter on GitHub.

DDEV #

Let’s set up a fresh DDEV project and start customizing.

  1. Make sure you have DDEV installed on your computer.
  2. If you’re a PHPStorm user, install the exceedingly helpful DDEV plugin. VS Code users have a similar plugin too!
  3. Follow Craft’s guide for creating a new project (they love DDEV too).

Now you have a fresh .ddev/config.yaml just waiting to be customized.

Node Version #

Open your DDEV config and make sure your Node JS version matches Vite’s recommendations.

nodejs_version: '20' # Vite 5 expects Node 18+

Ports for Vite’s dev server #

Next, expose ports that Vite’s dev server uses will use to serve assets.

web_extra_exposed_ports:
  - name: vite
    container_port: 3000
    http_port: 3000
    https_port: 3001

Routing ports can sometimes be confusing. This diagram might help!

  • Vite’s dev server runs inside of DDEV’s web container (a Docker container).
  • Until we expose these extra ports, any custom port within DDEV is unavailable to your host machine (your computer).
  • When it’s time to configure Vite, we’ll use port 3000
  • HTTP and HTTPS traffic must use separate ports.
  • We use port 3000 for http traffic and 3001 for https

Run Vite automatically #

Usually, you’ll want Vite to watch and build files automatically after you start a DDEV project. Using web_extra_daemons adds a separate background process (daemon) for Vite.

web_extra_daemons:
  # Run Vite in a separate process
  - name: 'vite'
    command: 'npm install && npm run dev'
    directory: /var/www/html

Use hooks to improve DX #

DDEV’s powerful hooks system can run tasks before or after various DDEV commands. These post-start tasks keep dependencies and schemas up to date every time you start DDEV.

hooks:
  post-start:
    - composer: install # Keeps installed packages up to date
    - exec: ./craft up # Apply migrations & project config changes

Time for Vite #

Vite is a Node app that’s installed with NPM. Your project will need a package.json. If you don’t have one set up yet, follow NPMs initialization script.

ddev npm init

# Don't forget to ignore node_modules!
echo node_modules >> .gitignore

????Why ddev at the start of the command? This let’s us run NPM from within DDEV’s Docker containers. This means you’ll always be using the Node version configured for this project. DDEV has a bunch of shortcuts and aliases for running CLI commands (such as npm, yarn, craft and composer).

Make sure your NPM package is configured for ES Modules #

Our various config files will be using ES Module syntax for imports and exports.

ddev npm pkg set type=module

Install Vite! #

ddev npm install --save-dev vite

Add convenience scripts to package.json #

"scripts": {
  "dev": "vite",
  "build": "vite build"
}

npm run dev runs Vite in dev mode. It watches and builds your files every save. Files are served through Vite’s dev server.

npm run build bundles your JavaScript, CSS and static images for production. Your deploy process will usually call this script.

Configure vite.config.js #

Running Vite for a server rendered CMS requires some extra configuration. These options put production files in the right spot and keeps Vite’s dev server running on a specific port.

import { defineConfig, loadEnv } from 'vite'

// Match ports in .ddev/config.yaml and config/vite.php
const HTTP_PORT = 3000
const HTTPS_PORT = 3001

export default defineConfig(({ command, mode }) => {
  const env = loadEnv(mode, process.cwd(), '')

  return {
    // In dev mode, we serve assets at the root of https://my.ddev.site:3000
    // In production, files live in the /dist directory
    base: command === 'serve' ? '' : '/dist/',
    build: {
      manifest: true,
      // Where your production files end up
      outDir: './web/dist/',
      rollupOptions: {
        input: {
          // The entry point for Vite, we'll create this file soon
          app: 'src/js/app.js',
        },
      },
    },
    server: {
	    // Special address that respond to all network requests
      host: '0.0.0.0',
	    // Use a strict port because we have to hard code this in vite.php
      strictPort: true,
      // This is the port running "inside" the Web container
      // It's the same as continer_port in .ddev/config.yaml
      port: HTTP_PORT,
      // Setting a specific origin ensures that your fonts & images load
      // correctly. Assumes you're accessing the front-end over https
      origin: env.PRIMARY_SITE_URL + ':' + HTTPS_PORT,
    },
  }
})

Add JavaScript and CSS files (Entrypoint) #

Vite needs an entry point to determine what JavaScript, CSS and Front End assets it needs to compile. Remember src/js/app.js that we defined in vite.config.js? Let's make that file now.

/* Make a file in src/js/app.js */

import '../css/app.css'

console.log('Hello Craft CMS')

We’ll also add our CSS as an import in app.js . In plain-old-JavaScript you can’t import CSS files. However, Vite uses this to figure out CSS dependencies for the project.

Once Vite builds everything for production, you end up with a separate CSS file. The Craft Vite plugin includes this automatically with along your JavaScript bundle.

/* Make a file in src/css/app.css */

body {
	background-color: peachpuff;
}

Install the Vite Craft Plugin #

ddev composer require nystudio107/craft-vite
ddev craft plugin/install vite

Vite assets have different URLs in dev mode vs. production. In dev mode, assets are served from Vite’s dev server. It uses the ports that we defined in our DDEV & Vite configs.

When Vite builds for production, filenames are hashed (app.js becomes app-BZi_KJSq.js). These hashes change when the contents of the file changes. Browser can cache these files indefinitely. When an asset changes, a whole new file is served.

To help find these hashed filenames, Vite creates a manifest.json file. The manifest associates the name of your asset src/js/app.js to the hashed file that ends up on your server web/dist/assets/app-BZi_KJSq.js

The Craft Vite Plugin by NYStudio107 takes care of all this routing for you.

{
  "src/js/app.js": {
    "file": "assets/app-BZi_KJSq.js",
    "name": "app",
    "src": "src/js/app.js",
    "isEntry": true,
    "css": ["assets/app-BXePGY5I.css"]
  }
}

Configure the Vite Craft Plugin #

Make a new plugin config file in config/vite.php

<?php

use crafthelpersApp;

// Use the current host for dev server requests. Otherwise fall back to the primary site.
$host = Craft::$app->getRequest()->getIsConsoleRequest()
    ? App::env('PRIMARY_SITE_URL')
    : Craft::$app->getRequest()->getHostInfo();

return [
    'devServerPublic' => "$host:3001", // Matches https_port in .ddev/config.yaml
    'serverPublic' => '/dist/',
    'useDevServer' => App::env('CRAFT_ENVIRONMENT') === 'dev',
    'manifestPath' => '@webroot/dist/.vite/manifest.json',
    // Optional if using React or Preact
    // 'includeReactRefreshShim' => true,
];

Include your Vite bundles in Twig #

The script and asset functions includes the appropriate files depending on in if you’re in dev mode or production. Clear out your templates/index.twig file and add the following snippet to your <head> tag.

{# Load our main CSS file in dev mode to avoid FOUC #}
{% if craft.vite.devServerRunning() %}
    <link rel="stylesheet" href="{{ craft.vite.asset("src/css/app.css") }}">
{% endif %}

{{ craft.vite.script('src/js/app.js', false) }}

Whew! ???? We’re at a point now where we can test our integration. Run ddev restart and then ddev launch . You should see “Hello Craft CMS” in your browser console.


Setup Tailwind #

Now that Vite is processing src/css/app.css, it’s time to install Tailwind and really get cooking.

These steps are based on Tailwind’s official installation guide. But make sure to run all commands from within DDEV.

Install packages #

ddev npm install -D tailwindcss postcss cssnano autoprefixer
# No DDEV shortcut for npx :(
ddev exec npx tailwindcss init -p

Configure template paths in tailwind.config.js #

/** @type {import('tailwindcss').Config} */
export default {
	// Watch Twig templates and any JS or JSX that might use Tailwind classes.
  content: ['./templates/**/*.twig', './src/**/*.{js,jsx,ts,tsx,svg}'],
  theme: {
    extend: {},
  },
  plugins: [],
}

Configure postcss.config.js for production #

export default {
  plugins: {
    tailwindcss: {},
    autoprefixer: {},
    ...(process.env.NODE_ENV === 'production' ? { cssnano: {} } : {})
  }
}

Add Tailwind directives to src/css/app.css #

@tailwind base;
@tailwind components;
@tailwind utilities;

You’ll most likely need to run ddev restart again to get Vite to recognize your new Tailwind config.


❓ Do i need to set up live reload of Twig? Turns out it’s already done for you! Styling a Tailwind project means editing Twig files to change styles. It’s super handy to reload your browser every time you save. Normally you’d reach for vite-plugin-restart to get this functionality. However, Tailwind’s JIT mode automatically notifies Vite when CSS has compiled and the page should reload.

That's a wrap! #

That’s all it takes to configure a minimal DDEV and Vite project! We’ve found that both of these tools are easy to extend as a project get more complo'ex. Adding things like Redis or React are just a plugin install and a few lines of config away.

???? If you'd like to see this setup (and more) in a real-world Craft CMS project, check out our Craft Site Starter on GitHub.

Go forth and Vite + DDEV to your heart’s desire.




m

What is a Headless CMS and When Should I Use One?

When starting a new project, decision makers are faced with the dilemma of choosing a content management system (CMS). Sometimes, it’s not that simple and they must choose whether to go with a traditional CMS or a headless CMS. Both offer unique benefits and cater to different needs, making it crucial to understand when each makes sense for your project. Let’s take a look at some considerations that can help you make the right decision.

What is a Traditional CMS?

Traditional CMS’s – like Craft CMS, WordPress, and Drupal – offer a pre-packaged solution for content creation, management, and delivery. They include powerful interfaces with content editing capabilities and templating out of the box, enabling you to create sites with ease. A traditional CMS can be monolithic because the back-end and front-end are tightly coupled. Using a traditional CMS typically means you are using all of the tools included to achieve your goal.

What is a Headless CMS?

A Headless CMS is like a Traditional CMS in that it includes content creation and management tools. But it differs in the fact that the back-end content management system is decoupled from the front-end (presentation layer), allowing developers to use any technology stack they prefer for building the front-end of the site. The back-end acts as an API with its only purpose being to serve content from the database. There are CMS options like ContentfulPayload, and Strapi that are built to be headless. Popular traditional CMS’s like Craft CMS and WordPress also offer headless variants.

The Restaurant Analogy

Let’s simplify things a bit more and look at the decision using an analogy; a restaurant.

Traditional Restaurant (Traditional CMS)

Imagine a restaurant where the kitchen and dining room are connected. The chefs cook the food, and the waitstaff serve it directly to the customers in the same building. This setup means that everything is closely integrated, and the kitchen (back-end) is tightly coupled to the dining experience (front-end). Picture a scenario where the restaurant decides to change from table service to buffet style. The food now needs to be prepared in advance and delivered to the front of house in a different way, potentially even requiring new equipment. The restaurant needs to be reconfigured to not only accommodate the buffet but also to interface with the kitchen differently. Because the restaurant and kitchen are coupled, both sides would require work in order to accommodate a shift in strategy. 

Ghost Kitchen (Headless CMS)

Now, think of a ghost (or cloud) kitchen where food is prepared centrally but can be delivered to various locations or dining experiences. The kitchen (back-end) focuses solely on cooking (content creation and management) and doesn't worry about where the food is served. Instead, the meals (content) can be delivered to different endpoints like food trucks, home deliveries, or partner restaurants (or in our case websites, mobile apps, etc.). This separation allows more flexibility in how and where the content is delivered without changing the core cooking process. If a new experience requires new equipment or processes, the kitchen can be expanded without affecting the front-end experience.

When to Use a Headless CMS

Omni-Channel Content Delivery 

If you consistently need to deliver content across multiple platforms (websites, mobile apps, IoT devices), a headless CMS is ideal because it can serve the same content through APIs to any front-end. The front-end can be swapped out without any need for development to the back-end.

Scalability and Flexibility

If you want the ability to keep your content management system up-to-date independently of the presentation layer, a headless CMS can allow for more agile and scalable development. This could be especially useful if you anticipate needing to redesign or update parts of the front-end frequently without affecting the back-end content.

Front-end Framework Preferences

Maybe your team has developers who are very proficient in a particular JavaScript framework, like Next.js, SvelteKit, or Astro. The time needed to learn a new templating language could push you past your deadline. Maybe you have some cool interactive interface in mind? A headless CMS can provide the raw content for your developers to build highly custom, tailor-made front-ends in whatever language or framework they please.

Security

Going headless can offer security advantages due to its decoupled nature. By communicating via API to the front-end, data access can be controlled more granularly. Because the back-end is only responsible for content management and delivery, fewer plugins are typically used which means a smaller chance of vulnerabilities due to third-party software.

Hosting & Infrastructure

A cloud-based headless CMS offers additional advantages over a self-hosted headless CMS. It can simplify maintenance and operating costs since the cloud provider is responsible for updates and security of the platform. Cloud-based solutions like Strapi Cloud often come with integrated security features, automatic backups, and disaster recovery options.

Which will you choose?

While the flexibility and security a headless CMS offers may be great benefits, it may not be necessary for every project and could even introduce complexity. It’s important to consider the long-term purpose of the project and who will be responsible for maintaining it as well as authoring content. If your primary focus is on managing and delivering content in a structured manner with rapid development, a traditional CMS can be an excellent choice. But if you feel any of the examples I’ve laid out above align with your project’s requirements then a headless CMS may be right for you! 

Whatever route you take, remember that both Craft CMS and WordPress can be used in traditional or headless applications and are a fine choice either way! Now you know the differences between a traditional and headless CMS, and an informed decision can be made. If you have more questions or a project you think could benefit from a traditional or headless CMS, we’d love to help!




m

Building Well-Connected Distributed Teams

Five years ago, without consciously trying, I would have noticed if a coworker was taking a break, feeling extra chatty, or looking hyper-focused. I got to choose whether to respond and how I might build rapport by responding (I’m sure I didn’t always get it right). Now that more of the Viget team works from home than in an office, I feel a loss. I have less awareness of other people's states of mind and fewer chances to demonstrate my interest. I need to learn new ways of connecting. 

I took notice when Adam Grant recently posted about pebbling

Sending memes, links, and videos to others isn't trivial. It signals that you're thinking of them and want them to share your joy. It's known as pebbling, based on penguins gifting pebbles to potential partners. Pebbling is an act of care. Every pebble is a bid for connection.” 

Grant acknowledges that the term "pebbling" comes from penguins, but he also uses the phrase “bid for connection,” which I associate with John Gottman. Gottman is a well-known psychologist who has researched marital stability and relationships. His work provides insights into how small interactions, or "bids," play a crucial role in building strong relationships. 

Gottman defines a "bid" as any attempt from one person to another for attention, affirmation, affection, or any positive connection. A bid can be as explicit as saying, “I had such a hard day,” or as random as saying, “Did you see the size of that red bird?” The impact of responding with interest (turning toward) or ignoring or dismissing (turning away from) significantly influences the quality of the relationship. A simple, “Tell me what happened,” or “What? No, I missed it!” can foster closeness and trust. Silence or something like, “Here we go again,” will spark feelings of neglect and distance.

Gottman's research is widely cited and has impacted my understanding of relationships.  I'm interested in bids for connection at work, particularly as our work environment has changed dramatically in recent years.

Connections at Work

Finding the right balance of work and non-work is a central challenge for most of us as we navigate demands on our time and energy. I generally hope work is a small enough part of a person’s life that they have time for many other things, but also that their work environment is engaging and meaningful enough that they enjoy it. I hope friendships emerge at work, mostly through collaboration or out of the gaps between responsibilities. 

As remote work has become commonplace, I find it’s harder to foster connections than it was before. The lack of proximity, and therefore organic social interactions, makes it harder for me to know my coworkers and be known by them. I’m not advocating for returning to offices. I’m noticing that after working with people for years in an office, I knew them better – their nerves before a presentation, their ability to set new people at ease, their grandma’s soup recipe, their knack for deadpan humor – and that made my life better. While many of my coworkers collaborate with each other daily through pair programming, design critiques, or iteration planning meetings, my work on a small People Team has always been less collaborative. For me, fewer organic in-person interactions means fewer interactions of any kind at work. 

The decline in ad-hoc opportunities for connecting impacts us all differently, but I am particularly interested because an aspect of my role at Viget is to nurture a strong company culture. For us that means a culture where we do excellent work, learn a lot, support each other, and – yes – make some friends. I’m looking for ways we can adapt our employee engagement efforts to the new work environment and evolve how we cultivate alignment.

The concept of "bids for connection" seems useful for understanding the building blocks of connection and, over time, friendships. As a mostly remote company, I want to be sure we’re asking: How do people make bids? How do others respond to them? What parts of the work environment encourage us to turn towards a bid? 

Bids While Distributed

There needs to be “space” for these interactions to happen across a distributed company, and we need to notice what is working and why. One opportunity for bids to play out is in recurring meetings. At Viget, we try to be efficient with our time, but we also build in time for informal interactions.  

Daily Stand-up Meetings

The discipline and project teams that do daily stand-ups are careful to keep them brief. These meetings need to be reliably quick-paced in order to fulfill their purpose. Still, without sacrificing efficiency, these meetings can spark strong bids for connection. Sharing work updates in small, daily increments encourages people to open up about specific elements of their progress. The specificity allows for connection in ways that broad strokes do not. Hearing someone say, “Progress was slow, but I’m finally done with the feature,” I might respond, “Oh, good.” But hearing someone say, “If I don’t figure out how to debug this API integration by noon, we need to update the launch timeline," gives me a chance to be curious, helpful, and invested in something very specific. 

Weekly All-Hands Meeting

Every Friday, our whole company meets for about an hour. The first 15 minutes are deliberately set aside for informal conversations and sharing, which mostly happens over Slack. We often play music or show a live stream of something noteworthy, like an eagle’s nest, to which we can react. Someone might share where they were when they first heard this song. Someone else might reveal they are an experienced falconer. The whole company gets a chance to see or hear these things, and while only a handful may react, we are all building shared awareness and memories.

Monthly Team Meeting

During a team meeting, a small group of same-discipline-peers comes together to talk shop, share lessons learned, or bond. These meetings allow for exercises that don’t scale to a whole company – like getting feedback or planning progress – and over time, certain activities can become team favorites. A monthly “rose, bud, thorn” or an annual “sharing circle” ritual prompts people to share in ways that otherwise might feel too awkward or vulnerable.

 

Another way to make and respond to bids for connection across locations is on Slack. Different kinds of Slack channels offer different kinds of opportunities.

Interest-based Slack Channels

At Viget we have channels like #woodworking, #sewing, #starwars, #hot-sauce, #gardening, #home-improvement, and many, many more. These types of channels allow people to go deeper than they might in more general channels. You know you’re talking to like-minded people, so why not dive fully into your opinion on robot vacuum cleaners?

"Random" Slack Channel

In our #random channel, I’ve seen everything from a heads up on free Firehouse subs to a recommendation for an estate planning system. The responses vary, too – sometimes they spark day-long conversations. At a minimum, posts will get a smattering of emoji responses and the impact can be significant. For example, a post might get a sympathetic :heart: but then a couple :same: or :it-me: come in and before you know it, there’s a subset of coworkers who realize they share the same rare phobia. I also think a share in #random can signal, “I’m between tasks. I’m open to distractions right now,” and folks can follow up with a DM.

Project-Specific Slack Channel

In channels where everyone is working on the same project with shared goals, stresses, and deadlines, we might see bids that build momentum. A PM might post something in the morning to encourage the team to rally behind a tough deadline. A designer might post mid-week, acknowledging the drudgery of certain tasks, implicitly giving everyone else permission to do the same. A developer might be slowly building a little arsenal of inside jokes and call-backs over weeks, dropping a note at just the right time to get others laughing. Someone might turn one of those jokes into a custom emoji that lives well beyond the project timeline and every time that inside-joke-emoji gets used, it's a bid for folks who worked on that team to recognize each other and reconnect. 

Recognizing Bids

We all grew up learning in-person social norms and have a mostly shared understanding of what’s considered warm, polite, stand-off-ish, or rude in the workplace. Now that we’re distributed, we may need to learn to recognize new signals and define new norms. 

A bid is an action that invites connection, but sometimes the action is so small, we might not notice it or realize it has potential value. Understanding the concept of bids can help us notice them and respond with more awareness. 

If we train ourselves to see bids for what they are and respond accordingly, we may get more mileage out of the limited impromptu interactions we have as remote coworkers. Actions like responding to an open-ended question in a Slack channel or acknowledging someone’s request for help during a meeting go a long way. Each response builds trust and camaraderie, even if in tiny doses. When a comment or question is ignored or dismissed, the negative effect is compounding; that person is less likely to reach out again.

Adam Grant said sharing memes and links are a way to invite someone to share in your joy.  At a distributed company, “bids” take a lot of different shapes, but they all communicate things like, “I am here,” and “let’s work together,” and “you can trust me.”

I’m encouraged to think we already have some infrastructure in place at Viget to support remote bids for connection. I’m excited to work with Aubrey Lear and others to find ways to evolve that infrastructure. We’ll continue to hire people who want to develop friendships with coworkers and who are willing to take personal responsibility for making and turning towards bids. Together, we can make sure Viget remains a great place to work as the workplace continues to evolve.




m

10 Things I Learned in My 10 Weeks at Viget

This summer, I was the Application Developer Intern at Viget. This being my first internship, I was pleasantly surprised by how much I learned. Rather than being tasked with fetching coffee or doing busy work, the internship focused primarily on our growth and development as interns. As my time at Viget comes to a close, I wanted to reflect on ten key things I learned during my experience here.

Following the real-world development cycle

Going into this internship, my development process involved me sitting down and coding until the feature was completed, and that's it. During this internship, I learned and practiced the development cycle used at Viget. For each feature, I created a Branch. Then, I submitted a Pull Request once it was completed. After that, my advisor reviewed my code and gave feedback. Once I had completed the requested changes (if any), I would rebase and merge into the main branch. This cycle made the code cleaner, and the feedback on my code always ensured I was going in the right direction.

Maintaining a clean git history

During my development process at Viget, my advisor ensured I took the necessary steps to maintain a clean git history in my projects. I put the corresponding issue number next to each git commit and pull request. This made it much easier to see which commits belonged to which feature when reviewing git history. I also learned to always use “rebase and merge” rather than “create a merge commit” when merging a pull request. This helped when reviewing git history as merge commits make it much more difficult to understand what’s going on, and rebase and merge provided a clean git history.

Getting introduced to DevOps

Nevin Morgan hosted a MicroClass where he went over the basics of DevOps. Going in, I didn’t know much about DevOps, but the class gave me a solid understanding of the basics. DevOps is a combination of philosophies, practices, and tools designed to improve the speed of development. Their responsibilities include:

  • Keeping Communication clear for development teams
  • Making sure teams continue collaborating
  • Ensuring deployments are quick and reliable

I also got the chance to pair with Nevin when he set up AWS deployment for one of my projects, and when he was setting up Grafana for Viget. Getting to see DevOps in action gave me a good idea of what goes into being part of the DevOps team.

Learning to work with clients

At the start of our intern group project, Nathan Long gave us a presentation on what it's like to work with clients. He covered the typical client project cycle, client presentations, and how to handle client feedback. For our project, we simulated a client relationship with Viget as our client. They provided us with their requirements, and me and the other interns planned out the details of what we would deliver. Throughout the process, we gave several client presentations, received valuable feedback, and iterated on our product. Two weeks later, we had a finished product, which we presented to the client in a live demo. This whole process was designed to mimic what Viget goes through with real clients, and seeing the different perspective required when working with clients was really eye-opening for me.

Exploring digital accessibility

Nathan Schmidt hosted a MicroClass for the interns on Accessibility. He gave us an overview of what digital accessibility is and who it impacts. I learned that digital accessibility is the lens through which we ensure that people of all abilities, and particularly those with disabilities, are able to engage with the digital world. Every website is graded to a level set from the Web Content Accessibility Guidelines (WCAG). These guidelines include video captions, text size, color contrast, and many more requirements. It is the industry standard to follow these WCAG guidelines so that your website can be accessible to a broad range of consumers.

Building confidence in public speaking

When the summer began and I learned that I would need to present to the entire company, I felt intimidated. Public speaking has always been a source of anxiety for me, but I had numerous opportunities to work on this skill. Throughout the summer, I became increasingly confident. First, my fellow interns and I presented our group project to everyone at Viget at the company-wide all hands meeting known as TTT. I presented my personal project to the Dev team, discussing the libraries I used and walking through my code. The most significant presentation I delivered was my final one, where I spoke to everyone at Viget about my Gap Year through a Viget Tradition known as LabShares. Public speaking is a skill that improves with practice, and the various opportunities I had greatly boosted my confidence in this area.

Diving into Vanilla JavaScript

Going into this summer, I had never written a line of JavaScript in my life. I quickly learned that JavaScript is essential if you’re going to work in web development. On my personal project, which was an audio sharing social media app, I had a for you page, and I wanted to make the page update as soon as the user went to the next sound. This would require me to write JavaScript. I went through and wrote Vanilla JavaScript to update all the necessary information from the server's response. Although it was a challenging and tedious process, it significantly enhanced my understanding of how websites work and the role of JavaScript in web development.

Getting my feet wet with Rails

For the first half of the internship, I got my foothold in Ruby on Rails. This was my first time writing in Ruby, so there was a bit of a learning curve. I started with the Rails tutorial and then made a Hacker News clone. This exposed me to a broad range of the application stack and got me prepared for the Intern project, where I also used Rails. I found Rails’ Model, View, Controller setup to be very intuitive, so the learning process was relatively painless.

Discovering the benefits of Tailwind

Being the only Application Developer Intern, my focus throughout the internship was primarily on the back-end. However, I did have the chance to use Tailwind for the first time during my personal project. The biggest thing that stuck out to me was how it was convenient to not have to go through and change the stylesheets myself. With Tailwind's utility-first approach, you can quickly apply predefined classes for spacing, colors, typography, and more, without having to write custom CSS. This makes it much faster to prototype and iterate on designs, as you can see changes immediately by simply adjusting the class names in your HTML.

Exploring the Basics of React

Chris Manning hosted a MicroClass on React. I had never actually used React, but he made the class very beginner friendly. React is a JavaScript library, whose main strength is how dynamically it responds to user input and cascades UI changes. Chris went over JSX and React components, props, children, and state memory. I didn’t have time to actually write any React this summer, but I appreciate that Chris hosted this class after I said React was something I was interested in!

Reflecting on what I’ve learned here at Viget, I realize how invaluable this experience has been for both my personal and professional growth. From learning Rails and JavaScript, to understanding the intricacies of client relationships, I've gained a wealth of knowledge that extends far beyond technical skills. The opportunity to work alongside experienced professionals and receive constructive feedback has been a huge source of development for me. As I move forward, I am excited to apply these lessons and continue exploring the world of Software Development, confident in the foundation this internship has provided.



  • Code
  • News & Culture
  • Back-end Engineering
  • Internships and Apprenticeships

m

Motion Magic: Project Insights From My Viget Internship

When we open an app or website, we do so to accomplish a task or find information. A well-designed user experience ensures users can achieve their goals efficiently. But what keeps us engaged beyond basic functionality? What differentiates a mundane interface from an exciting one? In my opinion as an up and coming UI developer, one key element is motion.

During my summer internship at Viget, I had the opportunity to dive deep into the world of agency work. From getting the chance to contribute to client sites to participating in a hackathon and pursuing a personal project, I seriously leveled up my stack and gained valuable development experience. Not to mention the amount I learned from exceptional, dedicated mentorship and micro-classes on everything from React to SQL to business models. 

However, coming into the internship, I had the specific goal of learning how to add motion to my web projects. I walked in on day one with no idea where to start, and now I’m leaving my last week with a complex knowledge of Rive, canvas elements, JavaScript animation, GSAP, and more. Here’s how… 

Spinet

In this two week hackathon project, I worked alongside Faye and Paul, the Product Designer and App Developer interns, to create a spinning wheel name picker. During the first week, I took on branding and visual design work. 

I spent the second week implementing wireframes. Through this project I learned how to transform client specifications into design directions, a style guide, and ultimately, UI components.

For this app, the motion of the spinning wheel was critical to the experience. Initially, client feedback indicated that the spin felt too uniform. I adjusted the motion parameters by extending the slowdown time and changing the easing function from linear to cubic, which increased feelings of suspense at the end of the spin animation. 

To add a level of joy and celebration to the winner announcement popup at the end of a spin, I incorporated confetti animations. In doing so, I discovered the world of JavaScript animation libraries that make implementing animations as easy as simple as adding the script to my HTML and adjusting the timing and placement of the animation object. Finally, we had ultimately decided on a modern, clean-cut video game aesthetic for the branding, and pulled this in through inspired sound effects, the logo design, and a 3D button component with a click animation accomplished entirely through Tailwind. 

Luna chatbot

After the hackathon, I got the chance to work on a personal project of my choice: an AI mental health chatbot inspired by tools like Woebot and EarKick. I was motivated by the question of what could make conversational AI feel less intimidating and more empathetic. My answer was an AI support companion with an animated avatar to enhance feelings of emotional connection and understanding. 

To get started, I experimented with various chatbot APIs and found that the Llama3 model was the best at following system prompts and offered the most natural interactions. A huge part of this project was the chatbot’s expression animations. I surveyed several popular tools and found Rive was the best fit for this, offering intricate animation capabilities, easy web integration, and a state machine for managing overlapping states and complex transitions.

The first step of animating in Rive is to create a design. Luckily, Rive has a vibrant open-source community, and I learned a lot from examining and remixing community files. The second step was learning to create the animations themselves. This was my first time animating anything, but the concept of keyframes was relatively intuitive, and the UI reminded me of video editing software, like iMovie, I’d used in the past.

The third and most challenging step for me was making all the animations work together in a state machine. 

This is the logic that connects animations together, taking input values that determine when to transition between states. Getting smooth animations between emotional states required a lot of rewiring and experimenting. Finally, embedding the Rive file in my project and linking the emotion data from API responses to the animation inputs was relatively straightforward using vanilla JavaScript. 

In conclusion

Animations, whether simple or complex, add a layer of interactivity and visual interest to digital products. Over a short 10 weeks, my internship projects allowed me to explore UI development, modern animation tools, and motion using CSS and JavaScript.

If you’re interested in bringing ideas to life and sparking joy through motion design, then diving into a passion project, seeking inspiration from the community, and exploring tools like Rive and GSAP will definitely kickstart your journey!



  • Code
  • Internships and Apprenticeships

m

Craft 5: What It Means For Super Table Page Builders

If you’re like us, you’ve likely built ‘page builder’ fields in Craft CMS using Matrix. But sometimes you need more than a block. We use Super Table to create ‘page sections’ that include some extra settings (like background color, controls for width, etc.). We can then nest a Matrix field to control page blocks within the Page Section (Super Table). This has worked well for us in the past but there's a new, simpler way to achieve this starting in Craft 5.

Upgrading a site from Craft 4 to Craft 5 can seem intimidating. Even more so when your site relies on complex content models like the one I described above. You might think, okay I'll upgrade to Craft 5 and then look into migrating to the newer method in the future. Well, now is the time. Verbb has announced that Super Table has reached end-of-life.  While there is a Craft 5 compatible version available, it won't receive updates. That means now is the perfect time to migrate your Super Table fields to native Matrix fields.

Craft 5 makes the process easy by converting Matrix blocks to entry types automatically during the upgrade. This guide will walk you through the process. We'll cover preparation, the upgrades themselves, and steps to clean up afterward. As you’ll see below, the process is actually quite simple and nothing to stress over!

An example page builder using Super Table with a nested Matrix in Craft 4

Preparing for the Upgrade

The first step in any upgrade is preparation. Start by backing up your site’s database. This ensures that you can restore your site to its previous state if anything goes wrong during the upgrade process. We use (and love) DDEV here at Viget, so this guide will be leveraging it. But you can easily adapt the commands if you are not. To create a database backup, run:

❯ ddev snapshot

Next, review the compatibility of your installed plugins. Check the Plugin Store or the author’s site to confirm that each plugin has a Craft 5 compatible version. Make a list of any plugins that need updating or replacing. Super Table will need to be updated to at least version 4.0.0.

It's also essential to familiarize yourself with the Craft 5 Upgrade Guide. This guide provides detailed information on the changes, new features, and potential breaking changes in Craft 5, helping you understand what to expect. It serves as a fantastic set of instructions to get your site upgraded.

The Upgrade Process

Once you're prepared, you can begin the upgrade process. Per the Craft Upgrade Guide, we will update Craft and plugins at the same time. Open your editor and modify your composer.json with the new versions of your plugins. The two for sure we will need to modify are:

"craftcms/cms": "^5.0.0",
"verbb/super-table": "^4.0.0",

After you've checked all your versions and are ready to proceed, run:

❯ ddev composer update

This command will update Craft (and its dependencies) and all your plugins to the latest version compatible with Craft 5. After updating, you need to run the database migrations to complete the upgrade. This can be accomplished by running:

❯ ddev craft up

During this upgrade process, Craft 5 automatically converts all of your existing Matrix blocks to entry types. This conversion requires no interaction from you, streamlining one of the most complex aspects of the upgrade. After it’s finished, all of your non-reusable matrix blocks are now their own reusable entry type.

Craft 5 automatically converted the matrix blocks to their own entry types

Updating Super Table Fields and Templates

With the Matrix blocks converted to entry types, you need to reconfigure any Super Table fields to be Matrix fields.

Update Super Table Fields:

  • Browse to SettingsFields and edit any Super Table fields
  • Change the field type from Super Table to Matrix (there will be no content loss when switching from Super Table to Matrix)
  • Select the entry type to use (Craft has already created one for you)
  • Save the field
  • That's it!
Changing the field type from Super Table to Matrix (with no content loss)

Review Your Templates: #

  • If you've been working with Super Table content as part of entry queried data, you may not need to make template changes at all

  • Search your templates for craft.superTable to find any direct queries of Super Table blocks and replace them with entry queries


At this point, you have removed your dependency on Super Table and have a page builder entirely built with Matrix fields. What were previously Super Table blocks are now a custom Entry Type and what were Matrix blocks are now also Entry Types. This allows you to have nested Matrix within Matrix thanks to Craft’s Entrification plan.

A nested Matrix in Matrix page builder at last!
Our page builder looks just like before, only now it adds entries instead of blocks

Cleaning Up After the Upgrade

After updating your fields and templates, it's time to clean up. First, uninstall the Super Table plugin. Navigate to SettingsPlugins in the Control Panel to uninstall the plugin. Then remove it from your project by running:

❯ ddev composer remove verbb/super-table

Thoroughly test your site to ensure everything is functioning correctly. Pay close attention to the entry types where you used Super Table fields, confirming that authoring and your front-end work as expected.

Additionally, you can also take this opportunity to clean up your fields and entry types. Craft 5’s reusable fields and entry types give you ample opportunity to consolidate and Craft 5 provides new utilities to make this process as simple as possible.

  • fields/auto-merge — Automatically discovers functionally identical fields and merges their uses together.
  • fields/merge — Manually merge one field into another of the same type and update uses of the merged field.
  • entry-types/merge — Merge one entry type into another and update uses of the merged entry type.

That’s it!

Upgrading from Craft 4 to Craft 5 and transitioning from Super Table is incredibly simple, thanks to Craft 5’s automatic conversion of Matrix blocks to entry types. Super Table will no longer be maintained moving forward, and it's better to switch to the native Craft solution for better long-term support. By following these steps, you can quickly tackle the change and take advantage of the new features and improvements in Craft 5. With careful planning, thorough testing, and a few commands, you’ll have your page builder working again in Craft 5 in no time. Happy upgrading!




m

Use Behavioral Analytics Data to Make Your Site More Effective

Behavioral analytics are a great way to get a sense of what users are or are not doing on your website or app. While behavioral analytics may not provide insights into why users are behaving a certain way, this method does provide a quick and cost-effective way to see what your users are currently doing at scale. Knowing how your users are engaging with your website or product can help you make informed decisions that have a positive impact on engagement and conversions.

Here at Viget, we use behavioral analytics data for a number of use cases:

  1. Our client has a specific question about a certain aspect of their website or app (e.g., a specific user flow or content type) and wants to learn more about how and when users are engaging. 
  2. We are redesigning a client’s website and want to get a sense of where the current experience is excelling or falling short.
  3. We are conducting an annual analysis to help clients keep an eye on potential areas of growth or stagnation. 
  4. We are reviewing behavioral changes on a site or app after launching a new experience or feature to assess performance.

But what kind of insights can you expect to find from behavioral analytics data? 

It ultimately depends on the website or app, the users, and the kinds of questions you are asking, but let’s go through a few different examples of what kind of information you can gain from behavioral analytics tools.


Who is using your website or product?

Understanding who is using your website can provide helpful context on your user base and potentially unlock growth with new user groups you may have been unaware of. To investigate this, we may look at geographic location, language, device type, and any other demographic information that may be available. Sometimes this kind of data provides what I like to call descriptive information—information that often doesn’t feel immediately actionable but can become more useful relative to other data points. This could come from comparing your data to last year, to industry standards, to other content on the website, or it might come from comparing it to an assumption that an individual or organization holds. 

Here are some examples of findings that shed light on who was using the website or product:

32% of sessions were from users outside the United States. 
  Through a previously conducted survey, we were aware that some users were looking for content that was not specific to the United States. This metric helped us better gauge the size of that need.
97% of Canadian sessions interacted with the website in English, with only 3% of Canadian sessions using French.
  We were unsure to what degree French content needed to be prioritized and this metric helped provide a sense of scale.
15% of searches were conducted on a mobile device. 
  Although 15% may seem low, this metric was actually higher than expected because there were known issues with the mobile search experience. This demonstrated that even though the mobile experience was harder to use than the desktop version, users were still inclined to use it, further illustrating the importance of improving the mobile experience. 

How do users get to your website or product?

Knowing how users navigate to your website or product can highlight what traffic sources are particularly effective in driving conversions, but it can also help to provide important context on user expectations or goals. To understand this, we look at both the source/medium that brought them to the website as well as the first page they viewed. 

For example, users might:

  • Come from google and land on a blog article
  • Go directly to your home page
  • Come from an email referral to a donation page 
  • Learn about you from ChatGPT and land on your About page

From there, we might look at engagement rate, conversion rates, or other metrics to get a sense of what these users are doing and whether anything stands out as particularly effective or ineffective. 

Here are some examples of acquisition insights that informed our understanding and approach:

Only 10% of sessions started on the home page, with most users starting much deeper in the site on content-specific pages.
  Because only a small portion of users entered on the homepage, we could not solely rely on homepage messaging to orient users to the site. This highlighted the importance of providing sufficient context on any page of the site to ensure that users navigate to their desired content, regardless of what page they land on.
Although the paid ads were effective in driving users to the website, those sessions had abnormally high bounce rates, with one traffic source having a 95% bounce rate. 
  This indicated a potential mismatch between what users expected based on the ad, and what was actually on the page.
Organic search brought in a large amount of new traffic to their site through the blog pages and while users engaged with the blog content, they were not engaging with the CTAs. 
  Because these new users were potentially learning about this organization for the first time, the donation CTAs were likely not the best fit, and we recommended shifting the CTAs on those pages to focus more on learning about the organization.

What content or features do users engage with?

Here is where we start to get to the meat of what your users are actually doing on your website or product. Knowing what users are doing and what they’re not using can help to establish priorities and inform decisions. You might be surprised to learn that users are actually engaging with specific features or content quite a bit, but others are barely used. If the content or feature is surprisingly popular, then we likely don’t want to outright remove it and may instead consider iterating or leveraging that offering more. If users aren’t engaging with content or a feature, it may be worth considering the effort to maintain and iterate on that offering. 

Here are some examples of engagement insights that helped us identify opportunities related to content or features:

Less than 1% of users were engaging with a particular feature. 
  These same users were showing high engagement with other features though, indicating that users either didn’t know this feature existed, knew the feature existed but didn’t understand the value add, or the feature was simply not something they needed.
For a highly engaged audience, there wasn’t a standout page that most users visited. These users viewed a variety of pages across multiple sessions, typically viewing highly specific content pages. 
  This indicated that instead of relying on a single page to drive conversions, getting users to the specific details they needed was likely a better approach in getting users to try the product.
Nearly 84K sessions engaged with a particular content type. 
  While this was lower than other content types, it was much higher than expected. It was largely organic traffic and the sessions were highly engaged. We recommended doing some additional research to better understand the potential opportunities with that type of content.

What is the user journey or path?

Another major area of investigation is the sequence of steps users take when viewing content or completing certain actions. This could be perusing content on the website, going through a signup funnel, or checking out to make a purchase. 

This helps us identify:

  • the actual paths that lead to conversions (which is not always the path we assume it is) 
  • areas where users drop off at key points in the funnel
  • moments where users have to “turn around” in the journey, because the path laid before them doesn’t align with their needs 

This information can help you build towards a frictionless experience that encourages users to sign up, complete a purchase, or find the resources they need.

Here are some examples of user journey insights that helped us understand where there were existing points of friction for users:

While the CTA to demo the product appealed to users and they were quick to engage with it, it often resulted in users backtracking to the previous page. 
  We hypothesized that users were eager to get to the demo, but were moving too quickly and missed important context, resulting in them having to go back to a previous page. We were able to confirm this with user testing and recommended transitioning some of that context to the CTA page.

What “turning around” in the user journey can look like:

A select few products had abnormally high drop off rates, but at different stages depending on the product. 
  For one product, there was an abnormally high cart-abandonment rate, and for another product, there was an abnormally low add-to-cart rate. Based on these findings we recommended looking further into what is impacting a user’s purchasing decisions.

What dropoff can look like at different stages:

The Ecosystem at Large

Some clients have a larger ecosystem of products or services, and it’s important to look at how users engage with and navigate across the ecosystem. This might include subdomains for a shop, a marketing site versus the product site, help documentation, etc. By looking at the larger ecosystem we can reveal important connections that are missing or connections that could be strengthened.

Here are some examples of insights that demonstrated a need for changes in those ecosystem connections:

For sessions where a user was looking for a particular kind of resource, 95% of the searches were done exclusively in a single subdomain or microsite.
  Through user interviews we were able to confirm that this siloed experience was intentional for experienced users but unintentional for less-experienced users, who were largely unaware of the other parts of the ecosystem that were available. We recommended making changes to improve discoverability of those other areas.
For sessions where a user navigated between two domains, 75% of sessions navigated to the other domain to view documentation specifically.
  Yet, depending on the product, sometimes the documentation was hosted on a subdomain specific to documentation and sometimes it was available on the product domain. This created an inconsistent experience where for some products, users could find what they needed on the product website, but for other products, users were sent to an entirely different subdomain. We recommended creating a more consistent experience for users, where regardless of the product, the documentation would be found in the same location. 

Here at Viget, there are a wide variety of insights we may discover for any one project through behavioral analytics. These insights can help to identify new user groups, help to prioritize content or features maintenance and updates, or bring to attention moments in the user journey that are causing friction. These opportunities can help you bring in new users and retain your existing users, by providing an experience that aligns with their needs, whether that is finding resources, getting involved in a community, or making a purchase.  

If you’re interested in making your website or application more effective for your users by leveraging the power of behavioral analytics data, we’d love to hear from you




m

Setting up a Python Project Using asdf, PDM, and Ruff

When I was tasked with looking into alternative ways to set up a new Python project (not just using the good ol' pip and requirements.txt setup), I decided to try to find the tools that felt best to me, as someone who writes Python and Ruby. On this journey, I found a way to manage dependencies in Python that felt as good as bundler, among other great tools.

The Runtime Version Manager #

asdf has been my primary tool of choice for language version management for multiple years now. The ease of adding plugins and switching between versions of those plugins at a local or global level has saved me massive amounts of time compared to alternatives.

If you've never set up asdf before, follow the instructions here to get it set up. For reference, I use fish for my shell, so I installed asdf using the "Fish & Git" section.

Once you have asdf on your machine, the next step is to add the plugins you need for your project. Plugins are the actual tools that you want to manage the versions of, like NodeJS, Python, Ruby, etc. For the purposes here, I'll start with adding the plugin for Python:

asdf plugin-add python

Once you have added a plugin to asdf, you're ready to install various versions of that plugin. Since we just installed Python, we can install the version we want:

asdf install python 3.12.4
# OR if we want to just use whatever the latest version is
asdf install python latest

Once the version you want is installed, you can tell asdf to use that version in the current directory by running:

asdf local python 3.12.4
# OR 
asdf local python latest

depending on which version of python you installed.

The Dependency Manager #

In the past, I just used pip install and requirements file(s) to handle most of this. I knew of other options, like pipx or pipenv, but I still have never tried using them. I was more interested in finding a dependency manager that did these things in a significantly different way than what I was used to with pip.

Therefore, I wanted to find something that felt similar to bundler for Ruby. Luckily, very early on in my journey here, I found PDM.

Upon reading what PDM did, I immediately decided to try it out and get a feel for what it offered. Some key notes for me that piqued my interest:

  • Lockfile support
  • Can run scripts in the "PDM environment"
    • pdm run flask run -p 3000 executes the normal flask run -p 3000 command within the context of your installed packages with PDM.
    • In other words, it adheres to PEP 582 and allows you to run project commands without needing to be in a virtual environment, which to me is a big plus.
  • Similar commands to bundler
    • pdm run => bundle exec
    • pdm install => bundle install
    • pdm add <package> => bundle add <gem-name>
      • Note: My workflow was almost always to just add gem <gem-name> to the Gemfile rather than using bundle add, but there is no direct 1:1 equivalent of a Gemfile with PDM.

Installing PDM #

PDM has its own asdf plugin, so let's just use that here as well! Running:

asdf plugin-add pdm

adds the plugin itself to asdf, and running:

asdf install pdm latest 
# can replace 'latest' with a specific version number here too

installs the latest version of PDM. Finally, set the local version with:

asdf local pdm latest
Side note about asdf local
  asdf local creates a .tool-versions file (if it doesn't already exist) in the current working directory, and appends the plugin and version number to it. At this point, the directory in which you ran asdf local python 3.12.4 and asdf local pdm latest should have that .tool-versions file, and the contents should be a line each for Python and PDM with their associated version numbers. This way, if someone else pulls down your project, they can just run asdf install and it will install the versions of those plugins, assuming the user has the necessary plugins added themselves.

Now that we have PDM and Python set up, we're ready to use PDM to install whichever packages we need. For simplicity, let's set up a simple Flask app:

pdm add flask flask-sqlalchemy flask-htmx

This line adds Flask, Flask-SQLAlchemy and Flask HTMX. Flask is a web application framework, Flask-SQLAlchemy adds SQLAlchemy and its ORM, and HTMX builds on top of HTML to allow you to write more powerful HTML where you'd otherwise need some JS. Side note, but HTMX is really cool. If you haven't used it before, give it a go! I'm even a part of the exclusive group of HTMX CEOs.

Linting and Formatting #

Finally, I wanted to find a way to avoid pulling in multiple packages (commonly, Black, Flake8 and isort) to handle linting and formatting, which felt to me like it could be the job of one tool.

Pretty quickly I was able to find Ruff which did everything I wanted it to, along with being really fast (thanks Rust ????).

First things first, we need to install Ruff. Since it's a Python package, we can do it using PDM:

pdm add ruff

Once it's installed, we can use ruff check and ruff format to lint and format, respectively. Note that since we installed via PDM, we need to prepend those ruff calls with pdm run:

pdm run ruff check --fix

This runs the linter and fixes any issues found (if they are automatically fixable). The linter can also be run in --watch mode:

pdm run ruff check --watch

which re-lints on every saved change and tells you of any new errors it finds.

The Ruff formatter is similar to use:

pdm run ruff format

which will automatically fix any formatting issues that it finds and can fix. If you want to use this in CI (which you should), you can use the --check flag that will instead exit with a non-zero status code, rather than actually formatting the files:

pdm run ruff format --check

Bringing it all together #

Working with projects set up this way is much easier than how I used to do it. Using tools like asdf, PDM, and Ruff rather than pyenv, pip, and Black/Flake8/isort make both setting up projects and pulling down/installing existing projects more straightforward. I hope the contents of this article are helpful to anyone interested in setting up Python projects in a similar way.




m

Some Thoughts after a Major Ruby on Rails Upgrade

For the past few weeks, I've been upgrading an older, fairly large Ruby on Rails app from Rails 5.2 to Rails 7.1 and from Ruby 2.7 to Ruby 3.3. During this time, I have also made the switch from Webpacker to Vite for asset bundling and made various JS and CSS upgrades to go along with that change. Here are a few takeaways from the experience.

Upgrade Regularly #

First, I know I am probably preaching to the choir with this one, but just upgrading your tech as you go and whenever you can is great. It prevents you from being in the position that I was in–having to make such a big jump all in one go. It also makes sure you keep getting security upgrades, and more security is never a bad thing. If you are up for it, you can even automate the process like GitHub does for their Rails upgrades or by using something like Dependabot for notifying you on when to upgrade dependencies.

Commit Often #

This is good advice for any project, but I think it is specifically good when working through issues that arise from upgrading. Whenever I have done a larger upgrade, there’s always at least one tricky issue that takes time to diagnose. This leads to me experimenting and trying a few different things before I figure out the actual fix. Committing often allows me to reset back away from these false paths whenever I decide to go down a new one. But I could also commit these false paths if I'm stuck, store them away in a separate branch, and come back to them later if I feel like an approach is worth a second look.

Leave Code Comments #

If you have a particularly confusing piece of code where its purpose or function is unclear, leave a comment. This is another piece of advice that is relevant at any time, but I found those comments to be extra helpful during this latest round of upgrades. There were several instances of code that had not been touched in years (and never touched by me) causing errors after upgrading the underlying tech. Some of these were well commented, which made it much easier to understand their purpose and decide how to fix them—or even whether to keep them. On the flip side, there were some pieces of code that were not well documented, which made fixing the errors much harder.

Avoid Fancy Code #

As somewhat of an alternative to the code comments, you can also just avoid fancier code. Try seeing if any code that is fairly complex can be simplified into something a bit easier to understand. Also, you want to avoid calling any private APIs that might change out from under you during your upgrade process which can lead to all sorts of weird bugs and behavior. I'm not saying do this completely in place of relevant comments, but simplifying where you can will somewhat cut back the need for them.

Be Selective with Dependencies #

When upgrading a massive Rails app and the Javascript associated with said app, you are often going to have to upgrade some of your dependencies as well. The more of these you have to upgrade, the higher chance you have of breaking something, so it is important to be selective when choosing these dependencies. During these upgrades, I ran into several issues caused by a dependency that really was not doing much for us in the grand scheme of things, but was causing more than its fair share of issues. If you want to read more about how to go about choosing dependencies, feel free to reference my colleague Sol's article on the subject.

The End #

I don't think these insights are particularly original or profound, but hopefully they give you something to think about as you make major upgrades on your own app or as you think ahead to future upgrades.



  • Code
  • Front-end Engineering
  • Back-end Engineering
  • Tooling

m

Founders Welcoming Business Partners

When Viget was founded in 1999, Andy and I used the title “Founding Partner.” We were founders of the business and also committed business partners. Within a couple of years, we switched to more specific titles: Co-Founder and President (Andy) and Co-Founder and CEO (me), but “business partners” was always the key structure.

We divided responsibilities of leadership, delivery, and operations in ways that optimized our different strengths and weaknesses. Key decision making has always been a collaborative process, with healthy debate between the two of us. I know some incredible solo entrepreneurs, but for us, having a partner to lean on, leverage, and grow with has been not only rewarding, it’s been essential to Viget’s longevity and success.

Also key to our success has been a founding principle of hiring incredible people who share our values and vision, value longevity and lasting relationships, and take pride in their work and careers. As they’ve joined, we’ve shared the opportunities and responsibilities that come with running a healthy business. Empowering others to lead key parts of Viget has taken us further than we’d ever gone otherwise.

Being owners and partners in the business has always been a privilege, an honor, and, at times, a stressful burden. When things go well – clients are happy, the team is gelling, the finances are solid – I’m filled with pride, satisfaction, and calm. When things aren’t going well – projects are sideways, turnover seems contagious, and the metrics point in the wrong direction – I’m filled with anxiety, frustration, and self-doubt. In either scenario, having a partner to navigate the waters with has been vital.

In recent years, three key areas of our business have matured thanks to the overall strength of our team and especially strong leadership. Our sales and marketing systems, tools, and strategies have fed a much more predictable revenue engine with great clients. Our client delivery processes and best practices have helped us consistently deliver value for our clients with more clarity, less risk, and better results. Finally, through some very challenging years in our industry, our culture has grown stronger and more adaptable, still centered on meaningful human connections at the core.

These three business areas have been led by Zach Robbins (sales and marketing), Kelly Kenny (delivery), and Emily Bloom (culture). They are the pillars upon which all other aspects of the business are built. These leaders have truly grown up with the business, having joined more than 13, 14, and 17 years ago, respectively. Their impact first as individual contributors, then managers, and eventually strategic leaders has been immeasurable.

Viget is coming up on a major milestone: we’ll soon eclipse 25 years since our founding on December 27, 1999. As Andy and I looked out at the next decade and beyond of our business, expanding our partnership became a clear goal. Embracing additional partners to not just lead their area of the business but to weigh in on all major decisions would help Viget continue to mature into the business we believe it can be. We saw an opportunity to invite others into the deep water of business partnership – the good, bad, and ugly – so that our shared decision making can be sharper, more insightful, and more strategic in the years to come.

At our fall retreat last week, we announced that we're welcoming Emily, Zach, and Kelly as partners at Viget. They’ve each been here for more than half of Viget’s history, each shaping Viget into what it is today. As partners, they’ll have even more influence as we take Viget into our second quarter century and beyond.



  • News & Culture

m

5 Ways to Make Your Next In-Person All-Hands Event Worthwhile

In recent years, as distributed work has become the norm, all-hands trips have become more commonplace. Even companies that have always done them now see their importance in a new light. They are expensive and demanding for everyone involved, but when they’re done well they can be incredibly impactful. Are you bringing your team together and feeling the stress of getting it right? Designing the time together takes strategic thinking, logistics planning, and the confidence to ask everyone to contribute to the event’s success.

Last week, we came together to connect, celebrate each other, and look forward to a bright future in our quarterly all-hands event we call Third Third Thursday or TTT. It was our first in-person all-hands event since May 2023. At Viget, we actively build our culture together. The responsibility doesn’t fall on just a few individuals' shoulders. Our events are successful because individuals show up, speak up, listen, and honor the limited time we have together in-person. This is evident in the chats over breakfast pastries, the all-in approach to competitions breakout sessions, and the peer talks and discussions throughout our events. This connection and camaraderie doesn’t just happen, we work hard to make it happen. 

Reflecting on last week’s event (and 7 years of other events), I want to share these five key planning tips to help you craft a successful event. 

Leverage your physical space to help achieve your event goals. This fall we had a smaller number of attendees and we wanted to encourage discussion throughout the event so we set up the room in large U shape to foster conversation. We also made the most of our exterior space, which featured a fire escape staircase, by hosting an egg drop competition. 

Over communicate, especially around when team members can expect breaks and when they can expect to be fed. As the event lead, I share my phone number multiple times ahead of and throughout the event. We also make sure to communicate in dedicated channels, including an event Slack channel for all attendees, a behind-the-scenes Slack channel for presenters only, and an event website. We share important key information like bus schedules and flight confirmations via email. In advance of the big day, we shared this slide with our team to both inform and inspire. 

Leave room for unstructured time and connection. Over the years we learned that some of the best discussions and a-ha moments come from chats over a meal or a snack during the “unplanned” parts of the event. Now we plan ahead for these, leaving ample time for unplanned, impromptu a-has. We think about airport Uber rides, charter bus rides, morning runs, evening board games, or late-night drinks and look for ways to grease the wheels of serendipity. This was especially important for us this fall since it had been so long since the last time we all gathered together

Look for ways to celebrate what is unique to your company. One pretty fantastic thing that comes with a quarter century in business is the community we’ve built along the way. We make a point to keep up with previous Viget employees who we proudly call our alumni. We love our alumni and enjoy recognizing their contributions to Viget. One way we do so is with annual picnics, which we host when the most current Viget employees are in town for an event. These picnics are often a great mix of reconnections and networking.

Find ways to surprise and delight. Think big and small. For example, this fall we put colored pencils and butcher block paper out during our meeting time. Our autumnal decor included blue(ish) and orange pumpkins (Viget colors!). We made a subtle callout to an internal project by serving french fries as our afternoon snack. And we surprised our team with Unreal treats for their bus rides home. The treats served as dessert and a means for us to introduce our next in-person event, our spring TTT, aka Viget25. 

Some companies advocate for all-hand retreats to be social and relaxing, but not “productive.” They tout a meeting-free event. At Viget, we see the meeting time as crucial because that is when peers share knowledge, reflect on their recent work, showcase client impact, and highlight new ideas and personal growth. Similarly, our co-founders reflect on Viget’s performance and share thoughts on the upcoming business direction. The meeting sparks genuine inspiration and creates a time for us to remember what brought us to Viget in the first place – to build world class tech in support of our clients. 

On the heels of a successful gathering, it’s time to start planning the next one. For our next event we’ll head to the Allegheny Mountains where we’ll leverage a unique and memorable venue, offer plenty of unstructured time for connection (with each other and nature), loop in alumni where appropriate, plan inspiring meeting content, enjoy many meals and treats together, and of course find ways to surprise and delight. 

Work-related travel isn't for everyone, but if you know someone who appreciates the idea of dedicated time to connect with and celebrate their peers, we’re hiring. And to all the culture champions and event planners out there, good luck with your next all-hands! 




m

Can I Import Photoshop Brushes into Affinity Photo?

This post: Can I Import Photoshop Brushes into Affinity Photo? was first published on Beyond Photo Tips by Susheel Chandradhas

Digital brushes are a powerful tool for digital artists, designers, and photographers. The brushes allow them to create a wide range of textures, patterns, and effects in image editing apps. Can Affinity Photo use existing Photoshop Brushes? Over the years, many professionals and hobbyists have curated extensive collections of Photoshop brushes over time, tailored to […]

This post: Can I Import Photoshop Brushes into Affinity Photo? was first published on Beyond Photo Tips




m

Sony A9 III: Game-changing Full-Frame Global Shutter, 120FPS 24.6MPx Camera

This post: Sony A9 III: Game-changing Full-Frame Global Shutter, 120FPS 24.6MPx Camera was first published on Beyond Photo Tips by Susheel Chandradhas

Sony announced the Sony A9 iii on 07 November 2023, a 24.6 Megapixel Full-frame mirrorless camera with the world’s first global shutter full-frame stacked CMOS image sensor capable of shooting at 120 frames per second. The camera also boasts a processor, the BIONZ XR, that is 8 times faster than the previous Sony BIONZ X […]

This post: Sony A9 III: Game-changing Full-Frame Global Shutter, 120FPS 24.6MPx Camera was first published on Beyond Photo Tips




m

Luminar Neo ’24 – An Introduction

This post: Luminar Neo ’24 – An Introduction was first published on Beyond Photo Tips by Susheel Chandradhas

Luminar Neo has been on my radar for quite a while. Previously, as a non-user, I had a few apprehensions about using it, but now that I’ve used it for a while I can give you a deep-dive series of articles about Luminar Neo starting with this overview of the application. In this article, I’m […]

This post: Luminar Neo ’24 – An Introduction was first published on Beyond Photo Tips




m

Affinity Acquired by Canva.com

This post: Affinity Acquired by Canva.com was first published on Beyond Photo Tips by Susheel Chandradhas

Today, Affinity and Canva, together announced the acquisition of Serif, the makers of the Affinity apps, by Canva. This is a significant development in the progress of the Affinity suite, and we are both excited, and hesitant at this development. What Is Affinity? Affinity is a suite of apps that allows designers, photographers, and publishers […]

This post: Affinity Acquired by Canva.com was first published on Beyond Photo Tips




m

Canon EOS R5 Mark II Specs

This post: Canon EOS R5 Mark II Specs was first published on Beyond Photo Tips by Susheel Chandradhas

Canon announced their update to the EOS R5, the EOS R5 Mark II today. As expected, the specs are a step up from the original R5. The sensor size is the same, though it is a new sensor with higher readouts. The Auto-Focus (AF) has been improved, with eye-control AF and new AF tracking options, […]

This post: Canon EOS R5 Mark II Specs was first published on Beyond Photo Tips




m

What Is The “.ACR” File Format?

This post: What Is The “.ACR” File Format? was first published on Beyond Photo Tips by Susheel Chandradhas

Recently while editing some images in Adobe Camera RAW (ACR), I noticed an additional, new, “.acr” sidecar file. In the past, I’ve written about the .XMP files that are created by Adobe Photoshop Lightroom Classic and Adobe Camera RAW when you edit raw images. This .ACR file was created in addition to the .XMP file, […]

This post: What Is The “.ACR” File Format? was first published on Beyond Photo Tips




m

RIP a Livecast #636 – Maggot May with special guest Necrosexual

We're excited to have our friend, the most electrifying man in corpse entertainment, Necrosexual join us at the top of the show to talk about his new EP, Seeds of […]




m

RIP a Livecast #640 – Neigh Means Neigh

We kick things off by talking about Facebook's downtime. We learn about some of the less-flattering things GG Allin did. We briefly speak to Jordan from Dark Saga, a band […]




m

RIP a Livecast #643 – The Armorist

Rob, Sid and Darren kick off the show this week talking about what they like and dislike about Halloween. We have an update on Vince Neil, check with the Alec […]





m

RIP a Livecast #646 – Joke Treadmill

We kick off this week's show with an important announcement. Loni joins us this week. We discuss the Brass Against onstage urination incident in great detail. We talk about Ace […]




m

RIP a Livecast #647 – Help Me How To Live

We kick things off on this edition talking a lot about the controversial Kid Rock song "Don't Tell Me How to Live." We talk about a weird video Kid Rock […]