WebDevPro #44: NotesGPT, Next.js 14 Booking App, JWT, YouTube embedding harm reduction, Universal domain types, LLMs against Jailbreaking Attacks.
Test URL Advertise with Us | Sign Up to the Newsletter
Print to Pixel: Optimize your learning experience with Packt
Several research studies have proven that printed books enhance comprehension, with the tactile experience of flipping pages and annotating the margins adding depth to the learning experience. However, developers can't overlook the practical benefits of eBooks, such as quickly finding relevant information or carrying an entire library on a single device.
Acknowledging the unique benefits of both formats, Packt is offering a 40% discount on all print books, plus a free eBook version of each purchase, from February 26th to February 29th.
What’s included:
A Vast Library: Enjoy 40% off on over 5,000 titles spanning topics from Cybersecurity to Generative AI.
Complimentary eBook: Each print book purchase includes a free eBook
AI Assistant: Top 500 books comes with a personalized AI that can simply complex topics to your learning style, offering an interactive learning experience.
Don’t miss out on this opportunity to enhance your personal and professional development with the quality and depth only Packt can offer. Your future as a tech leader begins today.
Start Building your Tech Library Today!
WebDevPro #44: NotesGPT, Next.js 14 Booking App, JWT, YouTube embedding harm reduction, Universal domain types, LLMs against Jailbreaking Attacks.
February 29, 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:
Next.js 14 Booking App with Live Data Scraping using Scraping Browser
I'm Building a Full-Stack App: Here Are the Libraries I'm Going to Use...
Don't miss our repository of manually curated collection of ChatGPT resources for web developers. Wanting to learn about Ruby? Our tutorial covers Using Ruby language enhancements from the book ‘From PHP to Ruby’.
Our relatively new section captures internet jibber-jabber about topics in the web ecosystem:
Google Is Paying Publishers to Test an Unreleased Gen AI Platform
Defending LLMs against Jailbreaking Attacks via Backtranslation
Google CEO Calls AI Chatbot Responses Biased and Unacceptable
Today's news covers Angular, BootStrap Laravel, and Ruby on Rails.
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.
NotesGPT: a full-stack AI voice note app - Last week, Hassan El Mghari launched notesGPT, a free and open source voice note app that has 35,000 visitors,7,000 users, and over 1,000 GitHub stars so far in the last week. It lets you to record a voice note, transcribes it uses Whisper, and uses Mixtralvia Together to extract action items and display them in an action items view. It’s fully open source and comes equipped with authentication, storage, vector search, action items, and is fully responsive on mobile for ease of use. This blog walks you through exactly how it was built.
Next.js 14 Booking App with Live Data Scraping using Scraping Browser - In the ever-evolving landscape of web development, the ability to efficiently gather, process, and display data from external sources has become increasingly valuable. This blog post introduces a comprehensive guide to building a robust Next.js application designed for scraping flight data from Kayak, one of the leading travel search engines. By leveraging the power of Next.js alongside modern technologies such as BullMQ, Redis, and Puppeteer.
JWT explained in 4 minutes (With Visuals) - JWT authentication and session authentication are ways to authenticate users of your web app. JWT stands for JSON Web Token, and it is a commonly used stateless user authentication standard used to securely transmit information between client and server in a JSON format. AJWT is encoded and not encrypted by default. It is digitally signed using a secret key known only to the server. It can be encrypted, but for this article we will focus on signed non-encrypted tokens. In this article we will explain the details of JWT, its structure along with its pros and cons.
Warp! - A new way to use your command line - This is the most innovative thing that has happened to command line interface of operating systems in this whole decade! You might be wondering now "what is this Warp?". In simple term, warp is a drop in replacement for the terminal in Unix-like OSes. That means you can do the work you do from your terminal using Warp much faster, better user friendlier. Let's dive into see what makes Warp better than your built-in terminal.
I'm Building a Full-Stack App: Here Are the Libraries I'm Going to Use... - There are countless frameworks and libraries that you can use to improve your full-stack application. We will cover exciting concepts like in-app notifications, making videos with react, and from email API for developers to creating interactive music in a browser. Let's get started then.
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 CLI resources for web developers:
chatgpt-twitter-bot - Twitter bot.
chatgpt-telegram-bot-serverless - Telegram bot.
chatgpt-telegram - Telegram bot.
myGPTReader - Slack bot.
ChatGPTSlackBot - Slack bot.
ChatGPT Discord Bot - Discord bot.
chatgpt-discord - Discord bot.
kubernetes-chatgpt-bot - Kubernetes bot.
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.
Europe probes Microsoft's €15M stake in AI upstart Mistral - The European Commission is investigating Microsoft's €15 million ($16.3 million) investment in French startup Mistral, which came just after the latter released a large language model to compete with OpenAI's ChatGPT.
YouTube video embedding harm reduction - Embedding external content on a website in the current enshittocene period is more annoying than ever, so here is a copy-pasteable snippet to embed a YouTube video while reducing its tracking and nuisance capabilities as much as possible.
Universal domain types - Skillful use of a strong static type system can eliminate certain classes of bugs. Using custom application-specific types instead of raw integers or strings is a powerful technique that will save you hours of debugging. This article shows a systematic approach to domain types, provides examples of domain types applicable to most applications, and contains hints on how to implement them effectively.
Google Is Paying Publishers to Test an Unreleased Gen AI Platform - Google launched a private program for a handful of independent publishers last month, providing the news organizations with beta access to an unreleased generative artificial intelligence platform in exchange for receiving analytics and feedback, according to documents seen by ADWEEK.
Google CEO Calls AI Chatbot Responses Biased and Unacceptable - Gemini, a chatbot based on the company’s most advanced AI technology, angered users last week by producing ahistoric images and blocking requests for depictions of white people. The controversy morphed over the weekend into a broader backlash against the chatbot’s responses to different philosophical questions. Sundar Pichai tells employees the company will make structural changes after controversy over ahistoric images and blocked requests.
Defending LLMs against Jailbreaking Attacks via Backtranslation - Although many large language models (LLMs) have been trained to refuse harmful requests, they are still vulnerable to jailbreaking attacks, which rewrite the original prompt to conceal its harmful intent. In this paper, we propose a new method for defending LLMs against jailbreaking attacks by ``backtranslation''. Specifically, given an initial response generated by the target LLM from an input prompt, our backtranslation prompts a language model to infer an input prompt that can lead to the response.
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
Questionable exclamation method names
As a cherry on top of the language enhancements in Ruby, its creators have also included a naming feature to add readability to our methods: the exclamation mark (!) (also known as a bang) and the question mark (?). They don’t change behavior in any way, but they allow for a line of code to read as a question or as an exclamation. Methods named with the exclamation mark are called dangerous methods because they modify the object from where they are called. Methods named with the question mark are called predicate methods and, by convention, return a Boolean.
To see this in action, we’ll create a method with the question mark. Let’s create a new file called enhanced_naming.rb and add the following code:
# enhanced_naming.rb
$married_status = false
def is_married
$married_status
end
The $married_status variable is a global variable, which simply means that we can modify or access its contents on a method or outside the method. In this case, we defined a method that gets the $married_status value. However, knowing that we can add the ? to the name of this method, let’s rename the is_married method like so:
# enhanced_naming.rb
$married_status = false
def is_married?
$married_status
end
Now, let’s use an already familiar one-liner to print a message for a married person:
puts "Promo for married people" if is_married?
While adding ? to the name of the method does not affect its behavior, it does change the sentence into an obvious question. We’ll see this syntax very often in Ruby.
Similarly, we can use the bang symbol (!) as part of the name of a method. Again, adding it to the name doesn’t affect the behavior by itself, but it tells whoever is reading the code that we’re doing something different than just calling a method. As an example, let’s rename our marry method to marry! and see what it looks like:
def marry!
$married_status = true
end
As a convention adopted by the Ruby community, the bang symbol (!) will tell the reader (of the code) that we are making a change within an object. A method without the bang symbol would simply return a value, but not affect the object itself. So, in this case, we are changing the $married_status value to true. This is what the code should look like now…read more.
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!
Angular
Signal Input is now available in developer preview for Angular devs - In Angular 17.1 we introduced signal-based inputs as a reactive alternative to decorator-based @Input(). The new inputs provide developers with new ways that allow you to integrate and benefit from Angular signals today and improve code quality and developer productivity by increasing type safety of inputs. Those are available in developer preview and we would like your feedback!
Laravel
Model Casts are moving to methods in Laravel 11 - This update is backward-compatible with Laravel 10, and you can still define casts via the $casts property combined with the new casts() method. The $casts property and casts() method are merged, with the method keys taking precedence over the $casts property.
Increment a Rate Limiter by a Custom Amount in Laravel 10.46 - The Laravel team released v10.46 this week with new Enum validation methods, incrementing a rate limiter by a custom amount, Conditionable Enum validation rules, and more.
Ruby on Rails
Autosaving has_one sets foreign key attribute when unchanged - This pull request corrected an issue where the has_one association would erroneously set the foreign key attribute even when unchanged. This behavior was inconsistent with the autosaving mechanism of belongs_to associations and could lead to unintended side effects, such as triggering an ActiveRecord::ReadOnlyAttributeError when the foreign key attribute is set as read-only.
Fix override existing join types in the query in the where.associated method - The fix now ensures that the association is joined using the correct join type (either INNER JOIN or LEFT OUTER JOIN) based on the existing joins in the scope. This prevents inadvertent overrides of existing join types and guarantees consistency in the resulting SQL queries.
Spring
Spring AI 0.8.0 Released - The Spring AI project was founded based on the realization that creating AI applications was no longer the sole domain of Machine Learning or AI Specialists, who typically use Python. With the meteoric rise in popularity of ChatGPT, which provides a simple Web API to access pre-trained models, creating compelling AI applications has become accessible to software developers across many languages and their ecosystems.
Spring Shell 3.1.9 and 3.2.2 are now available - Spring Shell 3.1.9 and 3.2.2 has been released and are now available from Maven Central. Please see the release notes 3.1.9 and release notes 3.2.2 for more details.
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





