WebDevPro #43: Git Good Practices, Google Gemini with Node.js, Namingless programming language, OpenAI API, FTC Against AI Impersonation.

Test URL Advertise with Us | Sign Up to the Newsletter

For WebDevPro Subscribers Only: Enter THE All-New PACKT LIBRARY!
The Packt Library offers boundless, all-you-can-digest access to the premier independent learning hub in tech. Dive into a myriad of concepts at your whim, whenever you desire. It stands as the ultimate and flexible agile learning platform, ensuring you stay ahead of the curve in 2024.
Check out what's in store with the revamped Packt Digital Library:
Unlimited, ad-free access to diverse tech learning resources.
50+ new titles monthly, including first-to-market technologies.
Exclusive early access to cutting-edge books in development.
Innovative learning tools: AI book assistants, code context explainer, text-to-speech.
Thousands of reference materials covering countless tech concepts.
Here are just a few of the many Web development titles we added last month:
Join today at the discounted rate of $10 per month for your first three months. Offer valid exclusively for our newsletter subscribers. Limited time offer – act now!
WebDevPro #43: Git Good Practices, Google Gemini with Node.js, Namingless programming language, OpenAI API, FTC Against AI Impersonation.
February 22, 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:
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:
FTC Proposes New Protections to Combat AI Impersonation of Individuals
OpenAI Deal Lets Employees Sell Shares at $86 Billion Valuation
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.
Be a better developer with these Git good practices - If you're a developer, you probably use the versioning system called Git on a daily basis. The use of this tool is crucial for the development process of an application, whether working in a team or individually. However, it's common to encounter messy repositories, commits with unclear messages that don't convey useful information, and misuse of branches, among other issues. Knowing how to use Git correctly and following good practices is essential for those who want to excel in the job market.
How to Use Google Gemini with Node.js - Recently, Google launched its APIs for Gemini developers. This comes with several libraries and frameworks that developers can use to incorporate into their applications. In this Article, we'll be building a simple Node.js application and integrate Google Gemini to it. We will be using the Google Gemini SDK for it.
How to build: an AI PowerPoint generator (Next.js, OpenAI, CopilotKit) - In this article, you will learn how to build an AI-powered PowerPoint application using Nextjs, CopilotKit & OpenAI. We will cover: Leveraging ChatGPT to create your PowerPoint presentation, Chatting with your PowerPoint presentation, and Adding audio and images to your PowerPoint presentation.
Build your own CLI version of MonkeyType - In this easy-to-follow tutorial, you will learn how to build your own CLI version of MonkeyType in minutes. Use the Python curses module to build a robust typing CLI application with WPM and Accuracy support. Are you ready to become a CLI MonkeyTyper? Whether this is your first CLI application or nth application. Feel free to follow along.
Write better PR's with this template - So, recently I started in a new company where the process of reviewing code is not a critical part of the workflow, so I am developing a template for our pull request, in an attempt to improve our codebase and the process of reviewing a new change. Checkout the template here.
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:
commit-assist - Automatically generate Git commit messages.
cz-git - Automatically generate Git commit messages.
ai-commit - Automatically generate conventional Git commit messages.
gptcommit - Git hook for authoring commit messages.
autodoc - Automatically generate codebase documentation.
GPT3 WordPress Post Generator - Generate WordPress blog posts.
aiac - Infrastructure-as-Code generator.
tenere - Terminal interface (TUI) for ChatGPT written in Rust.
shellChatGPT - Use ChatGPT from the command-line.
Shell Genie - Interact with the terminal in plain English.
ShellGPT - Use ChatGPT from the command-line.
chatGPT-shell-cli - Use ChatGPT from the command-line. Shell script.
aifiles - Organize and manage your files using AI.
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.
Gitt-cliff v2.0 now out! - git-cliff is a command-line tool (written in Rust) that provides a highly customizable way to generate changelogs from git history. It supports using custom regular expressions to alter changelogs which are mostly based on conventional commits. With a single configuration file, a wide variety of formats can be applied for a changelog, thanks to theJinja2/Django-inspired template engine.
Serving a Website from a Git Repo Without Cloning It - It's fairly common to use git repositories as a vehicle for serving websites. The webdev pushes their changes to some branch of a publicly available git repository, and some web server somewhere serves the current tip of that branch as the website. Github Pages would be the most famous example of this. It could be simplified further such that no local state is required except the current hash of the desired branch. This post is going to explain how this can be done by first guiding you through git's internals a bit.
The namingless programming language - Naming is hard. This programming language sees how far can we go without it. The main feature of the language is its avoidance of any naming of any sort. True to this maxim, the language itself doesn't have a name. "The namingless programming language" is a definition. Since there is only one such language in existence, it doesn't need a name.
OpenAI API - The OpenAI API is powered by a diverse set of models with different capabilities and price points. You can also make customizations to our models for your specific use case with fine-tuning.
FTC Proposes New Protections to Combat AI Impersonation of Individuals - The Federal Trade Commission is seeking public comment on a supplemental notice of proposed rulemaking that would prohibit the impersonation of individuals. The proposed rule changes would extend protections of the new rule on government and business impersonation that is being finalized by the Commission today.
OpenAI Deal Lets Employees Sell Shares at $86 Billion Valuation - OpenAI has completed a deal allowing employees to sell stakes in the company, according toa person familiar with the matter. The tender offer was planned alongside other funding efforts. Company quickly becomes one of tech’s most valuable startups.
Microsoft's commitment to Azure IoT - There was a recent erroneous system message on Feb 14th regarding the deprecation of Azure IoT Central. The error message stated that Azure IoT Central will be deprecated on March 31st, 2027 and starting April 1, 2024, you won’t be able to create new application resources. This message is not accurate and was presented in error.
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
Using Ruby language enhancements
For the most part, as developers, we should always strive to increase the readability of our code as this will help everyone in the long run. I’ve been in scenarios where I’ve looked back at my code and had trouble understanding what the code was doing. That meant that my code was poorly written. Imagine the toll that this poorly written code may have on the next developer or team that has to use it or, worse, improve it. In contrast, if my code was well written, we wouldn’t have this issue. This is me saying this: please write readable code, and I can’t stress enough the lengths Ruby developers will go to make their code readable over any other enhancement in our code. Ruby comes with some additional tools to achieve this.
The unless sentence
One example of these options is a language enhancement called the unless sentence. The unless sentence is a negative if sentence – that is, it will execute the code only when the condition is not met. Let’s see it being used in an example.
Let’s assume the following scenario: we have a product aimed at unmarried individuals. For simplicity, we will just print out the message “Promo for singles” if the person is not married. Let’s try to write the code for that. Let’s take our previous hash example for a person’s details:
person = { "name" => "Oscar", "age" => 35, "is_married" => true, "books_read_this_week" => 2.5 }
Now, let’s change the is_married value to false:
person = { "name" => "Oscar", "age" => 35, "is_married" => false, "books_read_this_week" => 2.5 }
Once we have declared that hash, we can try to print a message if the person is single:
puts "Promo for singles" if person["is_married"] == false
Because the person is not married, the output is as follows:
Promo for singles
And while the code works, it simply doesn’t look good. We could use the bang (!) operator to invert the Boolean value from true to false:
puts "Show promotion" if !person["is_married"]
Though this code still works, it still looks bad. Let’s look at the options Ruby has to fix this.
In most programming languages, you’ll see a lot of sentences that read “if not.” Of course, this is awful to read and goes against the readability principles of Ruby. To solve this issue, Ruby’s creators added the exact sentence to make this more readable: unless. It works similarly to the if statement but will execute the code if the condition is deemed false…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
Angular v17.2 is now available - Here are a few surprises for you — experimental support for Material 3, signal queries, model inputs, Netlify loader, and hydration debugging support in Angular DevTools. Learn more about the individual features and find links to documentation.
Material 3 Experimental Support in Angular 17.2 - We’re thrilled to announce that Angular 17.2 features experimental support for Material 3 theming in Angular Material. In this blog post we’re updating you on the latest news about this feature and providing a preview of what’s next for Material 3 support.
Bootstrap
Bootstrap 5.3.3 - Bootstrap v5.3.3 is here with bug fixes, documentation improvements, and more follow-up enhancements for color modes. Keep reading for the highlights!
Laravel
With Laravel 10.44 you can add Model Scopes and Observers using PHP Attributes -The Laravel team released v10.44 this week with two Eloquent model attributes to define global scopes and observers, a new select() collection method, and more.
Modularize Your Laravel Application With the Modular Package - The InterNACHI/modular package is a module system for Laravel applications for features you want to build modularly. This package provides convenience commands and tools that aid you in creating modules within your Laravel application.
Ruby on Rails
Latest updates for This Week in Rails! - Rails World CFP, ActiveRecord::Base.with_connection, devcontainer and puma-dev support and more!
Rails Versions 6.1.7.7, 7.0.8.2, and 7.1.3.2 have been released! - These are security releases, so please upgrade at your earliest convenience. The 7.1.3.1 releases contained a small bug, so we released 7.1.3.2 with a bug fix, but it doesn’t contain any other changes.
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


