menu
techminis

A naukri.com initiative

google-web-stories
Home

>

Programming News

Programming News

source image

PlanetPython

1M

read

267

img
dot

Glyph Lefkowitz: Small PINPal Update

  • Glyph Lefkowitz has updated his password memorization tool, PINPal, to fix a problem whereby forgotten tokens were deleted from the computer's memory making it impossible to retrieve them later. In order to improve upon his previous algorithm, more tokens are now hidden in the prompt before they are deleted so that the user has more opportunities to memorize them. PINPal uses spaced repetition to help users memorize new password codes safely, and incrementally generates passwords adding to its security. Although the command-line tool is aimed at specific users, it is open-source and available for anyone to use.
  • PINPal helps you memorize new secure passcodes for things you actually have to remember and can't simply put into your password manager. PINPal uses spaced repetition to ensure that you remember the codes it generates. If you can actually remember the new password, it is a good idea to get rid of old passwords eventually rather than doing periodic forced password resets. The computer you install PINPal on only ever stores the entire password in memory when you type it in.
  • PINPal is secure in the way it incrementally generates your password and stores even the partial fragments you are memorizing. The visual presentation now hides tokens in the prompt several memorizations before they're removed. Glyph Lefkowitz is working on making the tool more accessible to a broader audience and it is open source. The command-line tool is aimed at specific users.
  • PINPal helps you memorize new secure passcodes for things you actually have to remember and can't simply put into your password manager. Although you may be using a good password manager for your passwords, you may be protecting it with a password optimized for memorability, which is to say, one that isn't random and thus insecure.
  • PINPal solves a small security problem which can be ignored until it becomes a huge issue - users forgetting their vault password. This means doing password resets across every app which has been loaded into it so far which can be very time-consuming. PINPal uses spaced repetition to ensure you remember the codes it generates.
  • PINPal helps users memorize new password codes which are safe to remember by using spaced repetition and incrementally generating passwords. Glyph Lefkowitz believes it is important to practice memorizing passwords periodically to avoid forgetting your vault password. PINPal incrementally generates your password using a secure keyring module.
  • PINPal uses spaced repetition to ensure that you remember the codes it generates. If the password generated by PINPal is remembered, it is a good idea to get rid of old passwords eventually. Doing so reduces the risk that a password which has been stored on an old hard drive or darkweb dump is still out there somewhere. PINPal incrementally generates your password and only stores it in memory when you type it in.
  • Glyph Lefkowitz has improved his algorithm for password memorization tool, PINPal, to fix a problem whereby forgotten tokens were deleted from the computer's memory. He has improved the operational detail, meaning more tokens are now hidden in the prompt before they are deleted. PINPal is a safe way of memorising passcodes which can't go in your password manager.
  • Although the command-line tool is limited to specific users, it is open source and can be used by anyone with the skill to customize the shell prompt to invoke it periodically. Glyph Lefkowitz is working on making his tool more accessible to appeal to a broader audience, however.
  • Although PINPal is only accessible to command-line users, PINPal is open source and supports user contributions. PINPal solves the problem of forgotten vault passwords, thus avoiding the need for password reset across many apps at once. The tool uses spaced repetition to ensure users remember the codes it generates over time.

Read Full Article

like

16 Likes

source image

PlanetPython

1M

read

316

img
dot

Image Credit: PlanetPython

Seth Michael Larson: Quickly visualizing an SBOM document

  • To quickly visualize an SBOM document, you can use Anthony Harrison's sbom2dot project, the DOT language, and GraphViz.
  • Install GraphViz and sbom2dot.
  • Generate an SVG from an SBOM using sbom2dot and dot.
  • View the SVG in an image viewer or browser.

Read Full Article

like

19 Likes

source image

Medium

1M

read

430

img
dot

Image Credit: Medium

Getting Started with Coinbase SDK Wallets: A Hands-On Guide

  • Wallet interactions are fundamental to many blockchain applications.
  • The Coinbase SDK provides tools for managing wallets.
  • This guide walks you through setting up wallets, listing balances, and sending ETH.
  • Insights, code examples, and tips are shared along the way.

Read Full Article

like

25 Likes

source image

Dev

1M

read

434

img
dot

Image Credit: Dev

The Magic of useCallback ✨

  • The author discovered the magic of useCallback in React and shares their experience.
  • The problem was that a function for handling submenu clicks was being recreated on every component re-render.
  • The author used the useCallback hook to prevent unnecessary re-creations of the function.
  • Using useCallback improved performance, reduced re-renders, and resulted in cleaner code.

Read Full Article

like

26 Likes

source image

Dev

1M

read

95

img
dot

Image Credit: Dev

Using LRU Cache in Node.js and TypeScript

  • We often need to perform certain actions that are expensive in web application development, either because they are computationally heavy, take a long time to complete or require an external API call that is expensive.
  • Caching is a technique that allows us to store the results of a certain action so we don't have to perform the action again if the same data is requested again.
  • The lru-cache package can be used to implement an LRU Cache in Node.js with TypeScript.
  • The LRU Cache has a maximum size of 5 and when we request a sixth user, the least recently used item is removed from the cache to make room for the new data.
  • When we first request user data, it comes from the API. But when we request the same user again, the data is pulled from the cache, making the request much faster.
  • If we then request the first user again, it has to be fetched from the API because it's no longer in the cache.
  • When we request the same user data multiple times, it's served from the cache, making the requests much faster.
  • This reduces the load on the API, improves application performance, and can save resources and costs.
  • Overall, using LRU Cache can be very beneficial in web application development to increase performance and save cost.

Read Full Article

like

5 Likes

source image

Dev

1M

read

181

img
dot

Image Credit: Dev

Working with Files Asynchronously in Python using aiofiles and asyncio

  • Asynchronous code has become a mainstay of Python development.
  • File I/O can be a common blocker, so let's walk through how to use the aiofiles library to work with files asynchronously.
  • With aiofiles, you can read and write to files which can hang while waiting for a result, i.e., non-blocking code.
  • For reading from a file, you can asynchronously open and parse its JSON contents into a dictionary.
  • Writing to a file is also similar to standard Python file I/O using aiofiles.
  • You can use asyncio to go through many files asynchronously, read from every file, parse the JSON, and rewrite each Pokemon's moves to a new file.
  • You can use asyncio.ensure_future and asyncio.gather to end with data corresponding to those asynchronous tasks.
  • Adapt these code samples to the specific problems you're trying to solve so file I/O doesn't become a blocker in your asynchronous code.
  • aiohttp and asyncio are powerful tools for Python developers, and exploring them further will deepen your understanding of how to write efficient async Python code.
  • Use asyncio and aiofiles together to handle file I/O in asynchronous code.

Read Full Article

like

10 Likes

source image

Dev

1M

read

153

img
dot

Image Credit: Dev

From Chaos to Clarity: Formatting React Code for a Clean and Readable Codebase

  • Properly formatted code enhances the readability, maintainability and scalability of your codebase.
  • Benefits of well-formatted code include reduced mental load, consistent style among team members, and tooling compatibility.
  • Formatting methods include indentation, line length, naming conventions, spacing, braces/parenthesis, quotes, semicolons, file/folder structure, and comments.
  • Indentation visually organizes code hierarchy. The recommended white space is 2 spaces, not tabs.
  • Keeping line length between 80 to 100 characters on a single line is the industry standard. PEP 8 and Prettier recommend 80 characters to prevent horizontal scrolling.
  • Naming conventions for variables/functions include using camelCase. PascalCase should be used for React components and upper snake case for constants.
  • Recommended spacing is to separate operators with spaces, group variable and function assignment, and create blank lines between different code sections.
  • Dangling braces should be avoided according to the Airbnb style guide. Either single or double quotes should be used throughout the project.
  • Stick to either using semicolons or not using them. Good file and folder structure tips include grouping related files and using meaningful names.
  • Comments should be used sparingly. Only used to explain non-obvious decisions or to show why a piece of code exists rather than how it works.

Read Full Article

like

9 Likes

source image

Medium

1M

read

326

img
dot

Image Credit: Medium

Learn Spring JPA By Example With Oracle Database Free: Part II

  • This article focuses on using annotations like @OneToOne, @OneToMany, and @ManyToMany to manage entity relationships with Spring JPA
  • The example uses a movie schema with one-to-one, one-to-many, and many-to-many relationships
  • The article explains how the relationships are modeled with JPA and provides code examples
  • The article concludes with a test that demonstrates working with these relationships using Spring JPA repositories

Read Full Article

like

19 Likes

source image

Dev

1M

read

31

img
dot

Image Credit: Dev

Form-based Dataverse Web Resources with React, Typescript and FluentUI - Part 2

  • A new npm package has been released that automates the process of developing form-based HTML WebResources with React, Typescript, and FluentUI.
  • The package handles steps 2 to 4 of the manual process, including removing references to ClientGlobalContext.js.aspx and updating the index.tsx file.
  • It also provides improvements such as managing CSS internally with FluentUI makeStyles, using FluentUI tokens for handling sizes, positions, colors, etc., and automatically calling the render() function in development mode.
  • Developers can now create WebResources easily using the npm package by running 'npx create-react-app --template @_neronotte/cra-template-dataverse-webresource-form'.

Read Full Article

like

1 Like

source image

Hackernoon

1M

read

357

img
dot

Image Credit: Hackernoon

Mastering Effect Programming in JavaScript with Generators and Deno

  • In this article, the author explores how to implement generators through a simple web application using Deno with TypeScript. Deno is a runtime environment for executing TypeScript and JavaScript code, serving as an alternative to Node.js. The web application will be a chatbot that can report the current time, add numbers, and interact with multiple users simultaneously. It will use WebSocket to receive messages from users and respond using a channel and generators. This approach provides a compact and readable representation of business logic and convenient decomposition while isolating dialogues and ensuring encapsulation of business logic.
  • The author uses an HTTP server with WebSocket support in Deno, which does not require specialized libraries. A channel is used to represent our entire dialogue with users and is implemented as a class named Channel.
  • Additionally, the article delves into 'generators,' with a focus on Asynchronous Iterators and the yield* operator. The author defines 'effect' as the entire dialogue with a user represented as a generator, yielding different effects at each step. The say effect is executed immediately, sending a message to the socket, and the generator's code continues without waiting for data from the external environment. At each step, the generator either sends a message to the socket or suspends execution until a message is received and immediately passed back to the generator.
  • The advantages of using generators include the conciseness, convenience of decomposition, simplicity of effects, and isolation of dialogues. Although this approach has a downside that the types of returned values from the yield operator are not automatically inferred. The code inside the generator is very abstract, and it represents pure business logic — a precise and noiseless description of business processes. It makes it easy to write tests for business logic by checking that the sequence of effects returned by the generator matches the expected sequence.

Read Full Article

like

21 Likes

source image

PlanetPython

1M

read

262

img
dot

Image Credit: PlanetPython

Mike Driscoll: Textual ��� Switching Screens in Your Terminal

  • TheScreenis a container for your widgets. These screens occupy the dimensions of your terminal by default.
  • Creating Screens
  • When you create an application, you create aScreenimplicitly. But how do you create your ownScreen?
  • Wrapping Up

Read Full Article

like

15 Likes

source image

Dev

1M

read

203

img
dot

Image Credit: Dev

Go Basics: Syntax and Structure

  • The article covers the basics of the Go syntax and structure, including the main package and the function, the variables, constants, data types, zero values, type inference, and type conversion.
  • The main package is mandatory for creating an executable program, and the main function is where the program starts executing.
  • Go is a statically typed language, and variables are declared with the var keyword, or with shorthand syntax inside functions.
  • Constants are immutable values declared with the const keyword, and Go has several built-in data types, including basic types like int, float64, string, and bool.
  • Other data types in Go include composite types like arrays, slices, structs, and maps.
  • Variables declared without an explicit initial value in Go are given their zero value, which is 0 for numeric types, false for boolean types, an empty string for strings, and nil for pointers, slices, maps, and channels.
  • Go supports type inference, making it easier to write concise code.
  • To perform type conversion in Go, you need to explicitly convert between types by assigning the converted value to a variable.
  • The article provides a practical example program that demonstrates concepts like variables, constants, data types, zero values, type inference, and type conversion.
  • The article ends with some best practices such as using descriptive variable names, leveraging type inference, avoiding unnecessary type conversion, initializing variables explicitly, and keeping the main function clean.

Read Full Article

like

12 Likes

source image

Medium

1M

read

163

img
dot

Image Credit: Medium

The Game of Life: A Game of Entanglement

  • The Game of Life is a love story told by two characters, Life and Death, in an entangled affair.
  • They exist in a 2D simulated grid where Life evolves with the contrasting presence of Death.
  • Life and Death each follow their own set of rules in their eternal dialogue.
  • The story emphasizes the unpredictability and complexity of life.

Read Full Article

like

9 Likes

source image

Medium

1M

read

122

img
dot

Image Credit: Medium

Getting Started with the Open Source AI Hackathon

  • The Open Source AI Hackathon invites participants to create projects using AI, with prizes of $63,128.
  • The hackathon, organised by Ibrohim Abdivokhidov, the founder and CEO of Open Community, offers free mentorship to the top 10 open source AI projects.
  • The competition has one requirement: participants must build something cool or fun and ideally with AI.
  • The event will have four judges for submissions.
  • $63,128 in total prizes are available; some payments will be made in cryptocurrency.
  • Ibrohim Abdivokhidov has published more than four papers on AI research and is a prominent participant in hackathons.
  • Abdivokhidov is offering free mentorship to the winning projects, regardless of whether participants win in the different prize categories or not.
  • Participants are encouraged to join the community Discord and seek support.
  • The 'Resources' tab on the hackathon website offers project ideas, resources and supportive events.
  • Submissions can be made on the Chillguy.devpost.com website, with participants required to fill out a registration form.

Read Full Article

like

7 Likes

source image

Medium

1M

read

54

img
dot

Image Credit: Medium

KermitThe Unexpected Benefits of Taking a Break From Coding

  • Taking deliberate breaks from coding can actually improve creativity, productivity, and problem-solving abilities.
  • It may seem counter-intuitive, but taking breaks is effective for the coding profession.
  • Benefits of breaks include increased creativity and mental clarity.
  • Breaks can make coding easier rather than more difficult.

Read Full Article

like

3 Likes

For uninterrupted reading, download the app