WebDevPro #46: Open Source Next.js Projects, Functional programming to OOP codebases, Stylized image binning algorithm, Collaborative learning.

Test URL Advertise with Us | Sign Up to the Newsletter
Hello!
Thanks for being a valued member of the Packt Publishing family! Since you've used our products, we figured that you'd benefit from our free Web development newsletter to keep you up to date on market trends and advancements. Check out the latest _webdevpro issue below to learn more about what it has to offer. I hope you'll find it useful!
Our goal is to keep you informed through bite-sized actionable content in Web development in the form of practical articles & tutorials, illustrations, tools, and useful resources with every weekly issue. No jibber-jabber, no boring content.
Please feel free to reply to me in case of any queries. To help you understand what the _webdevpro has to offer, scroll below to read the latest issue. I hope you enjoy it.
Thanks,
Apurva Kadam
Editor-in-Chief, Packt
WebDevPro #46: Open Source Next.js Projects, Functional programming to OOP codebases, Stylized image binning algorithm, Collaborative learning.
March 20, 2024
Hi <<First Name>>,
Welcome to the _webdevpro! Your one stop for all things Web Dev!
We start today’s issue with community discussions on:
Top Open Source Next.js Projects for Meaningful Contributions
Let's bring functional programming to OOP codebases Snake...in pure HTML!? [no JS, no CSS, no images!!]
Don't miss our repository of manually curated collection of ChatGPT resources for web developers. Wanting to learn about Ruby? Our tutorial covers File Manipulation from the book ‘From PHP to Ruby’.
Our relatively new section captures internet jibber-jabber about topics in the web ecosystem:
LLMs can do jaw-dropping things. But nobody knows exactly why
Social learning: Collaborative learning with large language models
Today's news covers Laravel, Ruby on Rails, and Spring.
P.S.: If you have any suggestions or feedback, or would like us to feature your project on a particular subject, please write to us. Just respond to this email!
If you liked this installment, fill in our survey below and win a free Packt PDF.
Thanks,
Apurva Kadam
Editor-in-Chief, Packt
WebDev Community Speak
What is the WebDev industry talking about? Latest Developments? Cool tricks? Tutorials? Cheatsheets? How are Web Developers upskilling? Read about it all here.
Feeling Stuck With CSS? Open This! – Here are some shortcuts that can save you time and effort in your next encounter with this thing we all hate called CSS. CSS generators can save a lot of time and effort by creating consistent styles quickly and easily.
Python libraries you need to know in 2024 - Are you getting into Python? It’s a jungle! You have libraries just about anything you can think about - from creating games to building web applications. With this list, get a quick idea of 50 standard Python libraries and what they do whether you’re just getting started or looking to deepen your Python game.
Top Open Source Next.js Projects for Meaningful Contributions - Understand how large-scale web apps are structured by studying and contributing to these Next.js projects. Engaging with real-world projects is a pivotal strategy for developer growth. In this piece, we've compiled a selection of comprehensive Next.js projects for you to investigate and analyse.
Let's bring functional programming to OOP codebases - The goal of this article is to share views on functional programming concepts and propose an approach where we can use functional concepts within your already written OOP code. Hopefully, we'll stop arguing about which paradigm is better and start composing good ideas to produce increasingly better code each time!
Snake...in pure HTML!? [no JS, no CSS, no images!!]- Graham TheDev, and is back with another silly internet experiment (and you can skip straight to the game if you want). It all started so innocently, "can I write a snake game?". So, I thought to up the ante "no JavaScript, do it in pure CSS better in raw unstylized HTML". So here itis, snake, in pure HTML (with a little PHP trickery to power it).
On a scale of 1-10, how would you rate the relevance and usefulness of the community discussions in today’s issue?
lowest 1 2 3 4 5 6 7 8 9 10 highest
Sorry, voting is closed.
WebDev Repos
We at WebDevPro highlight Web resources in a week-on-week series. This week we bring you manually curated collection of ChatGPT integration resources for web developers:
chatgpt-raycast - Raycast extension.
mpociot/chatgpt-vscode - VSCode extension.
gencay/vscode-chatgpt - VSCode extension.
org-ai - Emacs org-mode.
vim-chatgpt - Vim plugin.
ChatGPT.nvim - Neovim plugin.
ChatGPT Jetbrains - Jetbrains plugin.
DocGPT - Writing assistant for Google Docs.
docGPT - Use ChatGPT in Google Docs.
SlidesAI - Create AI-powered presentations in Google Slides.
WordGPT - Use ChatGPT in Microsoft Word.
Add ChatGPT to Microsoft Word - How to integrate ChatGPT with Microsoft Word.
Open Assistant Helper - Improve Open Assistant with ChatGPT.
ChatGPTWizard - Embarcadero RAD Studio (Delphi & C++ Builder) plugin.
On a scale of 1-10, how would you rate the relevance and usefulness of the repositories in today’s issue?
lowest 1 2 3 4 5 6 7 8 9 10 highest
Sorry, voting is closed.
Have a GitHub project you want to show off? Write to us and we will feature it!
Internet Web Dev Jibber-Jabber
Random curious musings and interesting words about Web Dev on the Internet.
How to use PostgreSQL for geo-analytics tasks - Geoanalytics is crucial in military affairs, as a significant portion of military data contains geo-attributes. In this article, I will discuss how to use PostgreSQL to process geospatial data and address common geo-analytical tasks. The information will cover methods for finding the nearest objects, distance calculations, and using geospatial indexes to enhance these processes.
The De-Google Project - Like most people I too depend on a lot of online services. And again, like most, a lot of those services come from Big Tech giants in general and (in our case) Google in particular. And like many people, we are becoming less comfortable with that. So here is a systematic way of addressing the problem. This post summarizes dependencies and then I’ll post blog pieces about updates as a list.
Stylized image binning algorithm - Let’s slap these things together and build an interesting image processing algorithm / visualization. I’m gonna show you a tool + algorithm I’ve built for creating stylized, pixel-art-like images using a binning algorithm, and walk you through the process behind getting it up and running using Javascript and the <canvas> element. Here’s a preview of where we are headed.
Creating color palettes with the CSS color-mix() function - Colors can sometimes get out of hand in a project. We often start with a few well-chosen brand colors, but over time, we find ourselves adding variations. Perhaps we realize that we need to adjust the lightness of a button color for accessibility reasons, or that we need a slightly different variant of a component. How do we ensure that the colors we choose fit within the design system for our project? Enter a relatively new CSS color-mix() function for this purpose - It can generate different palette variations. Let's dive into how color-mix() can be a game-changer for your design process.
LLMs can do jaw-dropping things. But nobody knows exactly why - And that's a problem. Figuring it out is one of the biggest scientific puzzles of our time and a crucial step towards controlling more powerful future models. In certain cases, models could seemingly fail to learn a task and then all of a sudden just get it, as if a lightbulb had switched on. This wasn’t how deep learning was supposed to work.
Social learning: Collaborative learning with large language models - LLMs have significantly improved the state of the art for solving tasks specified using natural language, often reaching performance close to that of people. As these models increasingly enable assistive agents, it could be beneficial for them to learn effectively from each other, much like people do in social settings, which would allow LLM-based agents to improve each other’s performance.
"AI, no ads please": 4 words to wipe out $1tn - So far, most of what I’ve read about AI and ads talks about the impact on the demand side. For instance, buyers of ads will find it cheaper and easier to make creative with AI, which will inevitably cause job losses. Demand will increase because AI will help people target ads better. Almost no one is talking about the massive threat AI poses to the supply side of the online ads business. The whole adtech industry is worth $1trillion a year. But four words could wipe this revenue out.
On a scale of 1-10, how would you rate the relevance and usefulness of the Internet Jibber-Jabber section in today’s issue?
lowest 1 2 3 4 5 6 7 8 9 10 highest
Sorry, voting is closed.
Web Dev Tutorial
Creating and modifying file contents
One practical use of reading and writing a file would be creating and modifying a counter value saved in a text file. What if we wanted to keep track of how many times a script has been executed? We could add a file with a number and each time we run the script, we could increment this value and simply output it to the user. We’ll start by creating a file called counter.rb with the following code:
# counter.rb
file_instance = File.open("counter.txt", "w")
counter = file_instance.read
puts "Time(s) script has been run: #{counter}"
Again, we are opening a file, but in this case, we’ve added an additional parameter ("w") so that we can write contents to the file. Additionally, we are going to try to create the file with our script instead of creating it by ourselves. So, let’s run this script from the shell with ruby counter.rb. The output should be as follows:
counter.rb:3:in 'read': not opened for reading (IOError)
from counter.rb:3:in '<main>'
Unfortunately for us, this is an error. If we look closer at the error description, it reads not opened for reading. This is because we set "w" mode, which is a write-only mode. We can only write to the file in this mode. However, we need to both read and write the contents of the file. Also, notice that the counter.txt file has been created, and that’s an advantage of "w" mode. If the file we are trying to write doesn’t exist, it will create it for us. We want this behavior, but we also want to be able to read the contents of the file. So, let’s change the mode to "a+" in our script:
# counter.rb
file_instance = File.open("counter.txt", "a+")
counter = file_instance.read
puts "Time(s) script has been run: #{counter}"
Don’t forget to delete the counter.txt file and execute the script again. The output will now look like this:
Time(s) script has been run:
If we check the folder in which our script is, we will notice that the counter.txt file has been created. However, the value is empty, which is unintended. So, let’s tweak our script to convert that into a number:
Read the “From PHP to Ruby Basics” book now!
On a scale of 1-10, how would you rate the relevance and usefulness of the tutorial section in today’s issue?
lowest 1 2 3 4 5 6 7 8 9 10 highest
Sorry, voting is closed.
What's Happening in Web Dev?
Your dose of the latest releases, news and happenings in the Web Development industry!
Laravel
Laravel 11 is now released! - Laravel 11 is now released, including a minimum PHP v8.2, anew Laravel Reverb package, streamlined directory structure, and more.
Resources for Getting Up To Speed with Laravel 11 - Now that Laravel 11 is out, here are some resources from the community for getting up-to-speed with Laravel 11. Whether you’re a seasoned Laravel developer or just stepping into the world of web development, we’ve hand-picked some content we think will help you get up to speed quickly.
Laravel 11 streamlined configuration files - One of my favorite features in Laravel11 is the streamlined configuration files. During the development of Laravel11 all configuration files were removed from the default Laravel installation. However, a few weeks before release, Taylor decided tore-include a slimmed version of the config files in a default Laravel install but left the option to remove any files or options you don't need.
Tailwind has Open-sourced the V4 Alpha - The Tailwind team announced that they are open-sourcing their progress on the Tailwind CSS v4 alpha. This version is a very early peek into something that will be an incredible way to write CSS for web applications.
Ruby on Rails
Feedback for structuring the Active Record Query Guide - The Active Record Querying Guide is getting restructured and the team working on it requests feedback from the community.
Railties: configure sanitizer vendor in 7.1 defaults more robustly - In apps where rails-html-sanitizer was not eagerly loaded, the sanitizer default could end up being Rails::HTML4::Sanitizer when it should be set to Rails::HTML5::Sanitizer. This change requires rails-html-sanitizer immediately before it’s needed, and avoids the possibly-incorrect assumption that Rails::HTML::Sanitizer is already defined.
Illustrator.ai files are previewable as PDFs - This pull request changes it to accept PDF and any child types allows the previewer to explicitly work with Illustrator files again, which was only a happy accident previously. Another pull request made illustrator files previewable with Poppler as well.
Spring
Spring Tools 4.22.0 released - The 4.22.0 release of the Spring Tools 4 for Eclipse, Visual Studio Code, and Theia have arrived.
Spring AI 0.8.1 Released - The milestone 0.8.1 release of Spring AI is here. Thanks for all the community contributions and great discussion on GitHub issues.
On a scale of 1-10, how would you rate today’s issue of WebDevPro in terms of being informative, engaging, and useful?
lowest 1 2 3 4 5 6 7 8 9 10 highest
Sorry, voting is closed.
And that’s a wrap.
P.S.: If you have any suggestions or feedback, or would like us to feature your project on a particular subject, please write to us. Just respond to this email!
Someone forwarded this email? Sign Up here!
Not for you? Unsubscribe here.




Copyright (C) 2024 Packt Publishing. All rights reserved.
As a GDPR-compliant company, we want you to know why you’re getting this email. The _webdevpro team, as a part of Packt Publishing, believes that you have a legitimate interest in our newsletter and the products associated with it. Our research shows that you, <<Email Address>> , opted-in for communication with Packt Publishing in the past and we think that your previous interest warrants our appropriate communication. If you do not feel that you should have received this or are no longer interested in _webdevpro, you can opt out of our emails by unsubscribing here.
Our mailing address is:
Want to change how you receive these emails?
You can update your preferences or unsubscribe


