Tech – NEUS CORP https://neuscorp.com Curating NEWS Across Globe Wed, 03 Apr 2024 14:44:23 +0000 en-GB hourly 1 https://wordpress.org/?v=6.4.3 https://neuscorp.com/wp-content/uploads/2023/04/cropped-NEUS-32x32.png Tech – NEUS CORP https://neuscorp.com 32 32 Part 1: Building Full-Stack Web Applications with HTMX, Bun, Elysia, and MongoDB https://neuscorp.com/index.php/2024/04/03/part-1-building-full-stack-web-applications-with-htmx-bun-elysia-and-mongodb/ https://neuscorp.com/index.php/2024/04/03/part-1-building-full-stack-web-applications-with-htmx-bun-elysia-and-mongodb/#respond Wed, 03 Apr 2024 14:44:23 +0000 https://neuscorp.com/index.php/2024/04/03/part-1-building-full-stack-web-applications-with-htmx-bun-elysia-and-mongodb/ Source link

Bun and HTMX are two of the most interesting things happening in software right now. Bun is an incredibly fast, all-in-one server-side JavaScript platform, and HTMX is an HTML extension used to create simple, powerful interfaces. In this article, we’ll use these two great tools together to develop a full-stack application that uses MongoDB for data storage and Elysia as its HTTP server.

The tech stack

Our focus in this article is how the four main components of our tech stack interact. The components are Bun, HTMX, Elysia, and MongoDB. This stack gives you a fast-moving setup that is easy to configure and agile to change. 

  • Bun is a JavaScript runtime, bundler, package manager, and test runner.
  • Elysia is a high-performance HTTP server that is similar to Express but built for Bun.
  • HTMX offers a novel approach to adding fine-grained interactivity to HTML.
  • MongoDB is the flagship NoSQL document-oriented datastore.

Note that this article has two parts. In the second half, we will incorporate Pug, the HTMX templating engine, which we’ll use to develop a few fancy front-end interactions.

Installation and set up

You’ll need to install Bun.js, which is easy to do. We’re also going to run MongoDB as a service alongside Bun on our development machine. You can read about installing and setting up MongoDB here. Once you have these packages installed, both the bun -v and mongod -version commands should work from the command line.

Next, let’s begin a new project:


$ bun create elysia iw-beh

This tells bun to create a new project using the Elysia template. A template in Bun is a convenient way to jumpstart projects using the create command. Bun can work like Node, without any configuration, but the config is nice to have. (Learn more about Bun templates here.)

Now, move into the new directory: $ cd iw-beh.

And run the project as it is: $ bun run src/index.js.

This last command tells bun to run the src/index.js file. The src/index.js file is the code to start a simple Elysia server:


import { Elysia } from "elysia";

const app = new Elysia()
  .get(" () => "Hello Elysia")
  .listen(3000);

console.log(
  `🦊 Elysia is running at ${app.server?.hostname}:${app.server?.port}`
);

In this file, we import Elysia and use it to instantiate a new server that listens on port 3000 and has a single GET endpoint at the root. This endpoint returns a text string: “Hello Elysia.” How all this works is similar in spirit to Express.

If you visit localhost:3000 you’ll get a simple greeting:

A simple greeting that says: 'Hello, Elysia' IDG

Now that we have Elysia running, let’s add the static plugin. Elysia has several plugins for handling common scenarios. In this case, we want to serve some HTML from disk. The static plugin is just what we need:


$ bun add @elysiajs/static

Now the Elysia server running the static plugin should serve everything in the iw-beh/public directory. If we drop a simple HTML file in there and visit localhost:3000/ public, we’ll see its contents.

The magic of HTMX

Next, let’s add an HTMX page to index.html. Here’s a simple one from the HTMX homepage:


<script src="

<button hx-post="/clicked"
    hx-trigger="click"
    hx-target="#parent-div"
    hx-swap="outerHTML">
    Click Me!
</button>

This page displays a button. When clicked, the button makes a call to the server for the /clicked endpoint, and the button is replaced with whatever is in the response. There’s nothing there yet, so it currently doesn’t do anything.

But notice that all this is still HTML. We are making an API call and performing a fine-grained DOM change without any JavaScript. (The work is being done by the JavaScript in the htmx.org library we just imported, but the point is we don’t have to worry about it.)

HTMX provides an HTML syntax that does these things using just three element attributes:

  • hx-post submits a post when it is triggered for an AJAX request.
  • hx-target tells hx-post which events execute an AJAX request.
  • hx-swap says what to do when an AJAX event occurs. In this case, replace the present element with the response.

That’s pretty simple!

Elysia and MongoDB

Now let’s make an endpoint in Elysia that will write something to MongoDB. First, we’ll add the MongoDB driver for Bun:


bun add mongodb

Next, modify src.index.ts like this:


import { Elysia } from "elysia";
import { staticPlugin } from '@elysiajs/static';
const { MongoClient } = require('mongodb');

const app = new Elysia()
  .get(" () => "Hello Elysia")
  .get("/db", async () => {

    const url = "mongodb://127.0.0.1:27017/quote?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+1.8.0";

    const client = new MongoClient(url, { useUnifiedTopology: true });
try {

    await client.connect();

    const database = client.db('quote');
    const collection = database.collection('quotes');

    const stringData = "Thought is the grandchild of ignorance.";

    const result = await collection.insertOne({"quote":stringData});
    console.log(`String inserted with ID: ${result.insertedId}`);

  } catch (error) {
    console.error(error);
  } finally {
    await client.close();
  }
          return "OK";
  })
  .use(staticPlugin())
  .listen(3000);

console.log(
  `🦊 Elysia is running at ${app.server?.hostname}:${app.server?.port}`
);

In this code, we’ve added a /db endpoint that talks to MongoDB. Right now, it just writes a quote to the quote database, inside the quotes collection. You can test this directly by going to localhost:3000/db. Then, you can verify the data is in MongoDB:


$ mongosh

test> use quote
switched to db quote
quote> db.quotes.find()
[
  {
    _id: ObjectId("65ba936fd59e9c265cc8c092"),
    quote: 'Thought is the grandchild of ignorance.',
    author: 'Swami Venkatesananda'
  }
]

Create an HTMX table

Now that we are connecting to the database from the front end, let’s create a table to output the existing quotes. As a quick test, we’ll add an endpoint to the server:


.get("/quotes", async () => {
    const data = [
      { name: 'Alice' },
      { name: 'Bob' },
    ];
    // Build the HTML list structure
  let html="<ul>";
  for (const item of data) {
    html += `<li>${item.name}</li>`;
  }
  html += '</ul>';

    return html
  })

And then use it in our index.html:


<ul id="data-list"></ul>
<button hx-get="/quotes" hx-target="#data-list">Load Data</button>

Now, when you load /public/index.html and click the button, the list sent from the server is displayed. Notice that issuing HTML from the endpoint is different from the common JSON pattern. That is by design. We are conforming to RESTful principles here. HTMX has plugins for working with JSON endpoints, but this is more idiomatic.

In our endpoint, we are just manually creating the HTML. In a real application, we’d probably use some kind of JavaScript-HTML templating framework to make things more manageable.

Now, we can retrieve the data from the database:


.get("/quotes", async () => {

const url = "mongodb://127.0.0.1:27017/quote?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+1.8.0";

      const client = new MongoClient(url, { useUnifiedTopology: true });
    try {
      await client.connect();

      const database = client.db('quote');
      const collection = database.collection('quotes');

      const quotes = await collection.find().toArray();

      // Build the HTML table structure
      let html="<table border="1">";
      html += '<tr><th>Quote</th><th>Author</th></tr>';
      for (const quote of quotes) {
        html += `<tr><td>${quote.quote}</td><td>${quote.author}</td></tr>`;
      }
      html += '</table>';

      return html;
    } catch (error) {
      console.error(error);
      return "Error fetching quotes";
    } finally {
      await client.close();
    }

  })

In this endpoint, we retrieve all the existing quotes in the database and return them as a simple HTML table. (Note that in a real application, we’d extract the database connection work to a central place.)

You’ll see something like this:

HTMX table with one row and text. IDG

This screenshot shows the one row we inserted when we hit the /db endpoint earlier.

Now, let’s add the ability to create a new quote. Here’s the back-end code (src/index.ts):


app.post("/add-quote", async (req) => {
    const url = "mongodb://127.0.0.1:27017/quote?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+1.8.0";

    try {
        const client = new MongoClient(url, { useUnifiedTopology: true });
        await client.connect();

        const database = client.db('quote');
        const collection = database.collection('quotes');

        const quote = req.body.quote;
        const author = req.body.author;

        await collection.insertOne({ quote, author });

        return "Quote added successfully";
    } catch (error) {
        console.error(error);
        return "Error adding quote";
    } finally {
        await client.close();
    }
})

And here is the front end (public/index.html):


<form hx-post="/add-quote">
    <input type="text" name="quote" placeholder="Enter quote">
    <input type="text" name="author" placeholder="Enter author">
<button type="submit">Add Quote</button>

When you enter an author and quote, and hit Add Quote it’ll be added to the database. If you click Load Data, you will see your update in the list. It should look something like this:

HTMX table with two rows and text. IDG

If you look at both the server and client for the application so far, you can see that we’re doing a bare minimum of work. The biggest thing HTMX has streamlined here is submitting the form. The hx-post attribute replaces all the work of taking the data off the form, marshaling it into JSON, and submitting it with fetch() or something similar.

Conclusion

As things become more complex, you begin having to rely on JavaScript in the client, even with HTMX. For example, inline row editing. Some things that you might expect to use JavaScript for, like inserting the new rows directly into the table, can be done with HTMX swapping. HTMX lets you do a lot with its simple syntax and then fall back to JavaScript when necessary. 

The biggest mental change is in generating HTMX from the server. You have your choice of several high-end HTML or JavaScript templating engines to make this much easier. Once you are used to working with HTMX, it’s a breeze. Essentially, you’ve eliminated the whole layer of JSON conversion from the stack.

We’ve just taken the quickest run through combining bun, Elysia, HTMX, and MongoDB, but you should at least have a feel for this stack. The components work well together without any unnecessary friction. Bun, Elysia, and MongoDB quietly do their jobs, while HTMX takes a little more thought if you are more accustomed to JSON APIs. Find the code for this article on my GitHub repository. We’ll work more with this example in the next article, where we’ll use Pug to add some fancy interactions into the mix.

Copyright © 2024 IDG Communications, Inc.

(The following story may or may not have been edited by NEUSCORP.COM and was generated automatically from a Syndicated Feed. NEUSCORP.COM also bears no responsibility or liability for the content.)

]]>
https://neuscorp.com/index.php/2024/04/03/part-1-building-full-stack-web-applications-with-htmx-bun-elysia-and-mongodb/feed/ 0
Putin advocates for creation of Russian alternative to PS5 and Xbox gaming consoles https://neuscorp.com/index.php/2024/04/03/putin-advocates-for-creation-of-russian-alternative-to-ps5-and-xbox-gaming-consoles/ https://neuscorp.com/index.php/2024/04/03/putin-advocates-for-creation-of-russian-alternative-to-ps5-and-xbox-gaming-consoles/#respond Wed, 03 Apr 2024 13:43:00 +0000 https://neuscorp.com/index.php/2024/04/03/putin-advocates-for-creation-of-russian-alternative-to-ps5-and-xbox-gaming-consoles/ Source link

Russian President Vladimir Putin has reportedly urged his government to develop video game consoles that can compete with the likes of PlayStation and Xbox.

According to the state media agency Kommersant, the Kremlin has ordered the development of new console hardware, including portable devices, with a deadline of June 15. Putin has also directed the exploration and development of “an operating system and a cloud system” for delivering games and programs to users.

This is not the first time that the issue of creating and producing game consoles and set-top boxes in the Russian Federation has been raised. In 2022, the government discussed measures to support the video game industry through 2030, calling for the establishment of a state-controlled developer and publisher, which would require an investment of up to $50 billion.

In 2023, he also ordered the creation of an esports tournament featuring various games from Russia and its allied nations, such as World of Tanks and League of Legends.

Russian gaming industry

Russia is no stranger to the gaming world, as the bestselling video game Tetris was created in 1985 by Soviet software engineer Alexey Pajitnov. The Game Boy version ranks among the best-selling games of all time, with more than 35 million copies sold. Available on over 65 platforms, Tetris has set a Guinness World Record for the most ported video game.

Although the Russian video gaming industry isn’t a major force internationally, it boasts the largest player base in Europe, with an estimated 65.2 million players nationwide as of 2018. In 2001, Russia became the first country in the world to officially recognize competitive video gaming as a sport. Russia’s largest publisher, 1C, is the developer behind the IL-2 Sturmovik series and Theatre of War series.

Vladimir Goryachev, a journalist at the Russian gaming forum Riot Pixels, has stated that he finds it “strange” that the government had to issue an order despite the presence of “many wealthy companies.” However, he added that while there is a large market and appetite for gaming, the technical skills required were lacking.

The plan comes after every major video game company in the world stopped selling its games and hardware in the country, in protest at their invasion of Ukraine.

Featured image: Canva/ Presidential Executive Office of Russia

(The following story may or may not have been edited by NEUSCORP.COM and was generated automatically from a Syndicated Feed. NEUSCORP.COM also bears no responsibility or liability for the content.)

]]>
https://neuscorp.com/index.php/2024/04/03/putin-advocates-for-creation-of-russian-alternative-to-ps5-and-xbox-gaming-consoles/feed/ 0
Upgrade to the Pixel 7 Pro at Woot Today and Save an Incredible $600 https://neuscorp.com/index.php/2024/04/03/upgrade-to-the-pixel-7-pro-at-woot-today-and-save-an-incredible-600/ https://neuscorp.com/index.php/2024/04/03/upgrade-to-the-pixel-7-pro-at-woot-today-and-save-an-incredible-600/#respond Wed, 03 Apr 2024 12:39:25 +0000 https://neuscorp.com/index.php/2024/04/03/upgrade-to-the-pixel-7-pro-at-woot-today-and-save-an-incredible-600/ Source link

The latest and greatest model to come out of Google might be the Pixel 8 Pro, but the Pixel 7 Pro, is still an excellent phone. It was the flagship model until not that long ago, and it’s a brilliant option if you can find one at a good price. It’s even better when you can get it at a great price, and Woot is now offering a brand-new 512GB Pixel 7 Pro for $500 rather than the $1,100 it usually goes for. That’s a whopping $600 discount and one that is available across a variety of different colorways including the rather lovely Hazel. And with 512GB of storage, you won’t run out of space any time soon.

The Pixel 7 Pro formerly appeared on our list of best phones to buy in 2023, and for good reason. It has a sleek design and a lot of power under the hood with its Tensor G2 chip that puts it on par with something like the Samsung S22 Ultra in terms of performance. That means you get a smooth experience out of using it, especially with the latest Android software, which the Pixel 7 Pro is optimized to use given that Google makes Android.

You also get three excellent cameras: a 50-megapixel main camera, a 48-megapixel telephoto lens and a 12-megapixel ultrawide camera. There’s also a lot more AI in the imaging software this time around and even includes a photo unblur tool which is useful in a lot of scenarios. You’ll also get to see all your pics on a gorgeous 6.7-inch screen that’s running a 3,120×1,440-pixel resolution and a 120Hz refresh rate, the latter of which makes for a snappy experience and is what you’d want to see on a flagship phone.

The Pixel 7 Pro continues to be an impressive phone in 2024 for those that don’t necessarily need the latest advancements, especially when you consider the discounted price. Or, if you’d rather go for something else entirely, check out our roundup of the best phone deals available right now.

More shopping deals from CNET

(The following story may or may not have been edited by NEUSCORP.COM and was generated automatically from a Syndicated Feed. NEUSCORP.COM also bears no responsibility or liability for the content.)

]]>
https://neuscorp.com/index.php/2024/04/03/upgrade-to-the-pixel-7-pro-at-woot-today-and-save-an-incredible-600/feed/ 0
The Future of Technology: A Look Ahead https://neuscorp.com/index.php/2024/04/03/the-future-of-technology-a-look-ahead/ https://neuscorp.com/index.php/2024/04/03/the-future-of-technology-a-look-ahead/#respond Wed, 03 Apr 2024 11:38:03 +0000 https://neuscorp.com/index.php/2024/04/03/the-future-of-technology-a-look-ahead/ Source link

How will the internet, and other tech we use today, evolve in the future?

(The following story may or may not have been edited by NEUSCORP.COM and was generated automatically from a Syndicated Feed. NEUSCORP.COM also bears no responsibility or liability for the content.)

]]>
https://neuscorp.com/index.php/2024/04/03/the-future-of-technology-a-look-ahead/feed/ 0
Kaleidescape Introduces New 96TB and 72TB Storage Options for Terra Prime Movie Servers https://neuscorp.com/index.php/2024/04/03/kaleidescape-introduces-new-96tb-and-72tb-storage-options-for-terra-prime-movie-servers/ https://neuscorp.com/index.php/2024/04/03/kaleidescape-introduces-new-96tb-and-72tb-storage-options-for-terra-prime-movie-servers/#respond Wed, 03 Apr 2024 10:36:29 +0000 https://neuscorp.com/index.php/2024/04/03/kaleidescape-introduces-new-96tb-and-72tb-storage-options-for-terra-prime-movie-servers/ Source link

For those who love cinema and access to the best available version of their favourite films, it is very hard to find a better option than the movie players and movie servers offered by Kaleidescape. That level of access and performance comes with a rather steep price but you would be hard pressed to find an ultra high-performance dedicated home theater that doesn’t use one of their products.

We have first hand experience with their products and all of us would own one of their movie servers and players if our budgets stretched that far. Products like the new 96TB and 72TB versions of the Terra Prime movie servers are designed for movie collectors like EIC Ian White who owns close to 4,000 films on DVD, Blu-ray and UHD 4K Blu-ray.

The Kaleidescape system offers several movie server and player products that work in conjunction with an online store where you can rent or purchase movies (prices vary) in DVD, Blu-ray, or UHD Blu-ray video quality (including HDR), along with access to advanced audio (Dolby Atmos/DTS:X) and access to all the special features you might find on a disc version. 

Kaleidescape Movie Select Screen

Kaleidescape also offers a Disc-to-Digital program, to assist customers with transitioning their DVD and Blu-ray disc collections to digital on Kaleidescape. This provides an opportunity for disc collectors to enjoy the benefits of the Kaleidescape ecosystem without having to repurchase every movie at full price.  

New Terra Prime Movie Servers

To further solidify its Terra Prime series, Kaleidescape has announced its largest server so far, the Terra Prime 96TB. Parallel to that announcement the company is also offering up a new Terra Prime 72TB movie server. The Terra Prime 96TB and 72TB servers replace the current 88TB server.

Tip: The Terra Prime 72TB server is an upgrade from the previous Terra 72TB server.

Core features of the Kaleidescape Terra Prime Movie Server product line include:

  • All-new board design, faster processing power, and a faster network.
  • 2.5 Gigabit Ethernet
  • Enterprise-class hard disk drives
  • Storage options for approximately 1,600 (96TB), 1,200 (72TB), 800 (48TB), 350 (22TB), or 130 (8TB) 4K UHD movies
  • Download a Kaleidescape high-bitrate 4K UHD movie in as little as eight minutes (provided you have very high-speed internet – contact Kaleidescape for details).
  • Distributes up to five simultaneous playback streams (compact models)
  • Distributes up to 10 simultaneous playback streams (full-size models)
  • Movies can be downloaded on up to five systems; perfect for multiple residences
  • Custom rack mounts are sold separately
Kaleidescape Terra Prime Movie Server Rear

The full-size Terra Prime HDD 96TB stores approximately 1,600 Kaleidescape high-bitrate 4K movies, and the 72TB stores roughly 1,200 Kaleidescape fidelity 4K movies.

Other Kaleidescape Movie Server Options

As a comparison, the Kaleidescape Prime 48TB server can store approximately 800 Kaleidescape 4K movies, the compact Terra Prime HDD 22TB stores approximately 350 4K movies, and the 8TB can store roughly 130 4K UHD movies. 

Kaleidescape also offers Terra Prime 31TB and 8TB Solid-State (SSD – Solid State Driver) models are ideal for marine and state-of-the-art installations that are enabled with 2.5 gigabit Ethernet or higher and require multiple playback zones. 

Kaleidescape Terra Prime 72TB Movie Server

Comparison

Terra Prime 96TB Terra Prime 72TB
MSRP $26,995 $20,995
Dimensions (WHD) 17.0×3.5×10.0 in (43.2×8.9×25.4 cm) 17.0×3.5×10.0 in (43.2×8.9×25.4 cm)
Weight 15.4 lbs (7.0kg) with no drives installed
21.6 lbs (9.8kg) with four hard drives
15.4 lbs (7.0kg) with no drives installed
21.6 lbs (9.8kg) with four hard drives
Fan Drive Noise (Typical) 29 dB(A) 29 dB(A)
Power Consumption (MAX) 48W 48W
Power Consumption (Typical) 43W 43W
External Power Adapter 2.6×1.4×6.5in (6.6×3.5×16.5cm)

150W with detachable line cord 100-240V, 50-60Hz universal input 12VDC @ 12.5A

2.6×1.4×6.5in (6.6×3.5×16.5cm)

150W with detachable line cord 100-240V, 50-60Hz universal input 12VDC @ 12.5A

Storage Four removable 24TB, 18TB, or 12TB hard drives (96TB, 72TB, or 48TB total) 96TB configuration:
~1,600 4K movies
~2,600 HD movies
~14,400 SD movies
72TB configuration:
~1,200 4K movies
~1,950 HD movies
~10,800 SD movies
Rack Mount (Sold Separately) Rack shelf available for mounting one unit in a 19-inch rack, 2RU space Rack shelf available for mounting one unit in a 19-inch rack, 2RU space

From Tayloe Stansbury, chairman & CEO of Kaleidescape: “Kaleidescape continues to innovate, delivering hardware improvements and frequent automatic software updates, to enrich customers’ movie-watching experience…These new servers enable customers to build robust libraries encompassing movies, TV series, and concerts with lossless audio and full reference video.” 

Advertisement. Scroll to continue reading.

Tip: For a comparison of the rest of Kaleidescape’s Terra Prime movie servers  (including pricing), refer to our previous article: Kaleidescape’s New Terra Prime Movie Servers Support 2.5 Gigabit Ethernet Transfer Speeds.

Where to Buy

Kaleidescape movie servers are available at Dreamedia and other authorized online retailers or dealers in your area.  

Tip: If you are assembling a system from scratch for your home theater setup, a local authorized dealer can give you the best advice. 

(The following story may or may not have been edited by NEUSCORP.COM and was generated automatically from a Syndicated Feed. NEUSCORP.COM also bears no responsibility or liability for the content.)

]]>
https://neuscorp.com/index.php/2024/04/03/kaleidescape-introduces-new-96tb-and-72tb-storage-options-for-terra-prime-movie-servers/feed/ 0
Mitigating the Risks of AI-Generated Code https://neuscorp.com/index.php/2024/04/03/mitigating-the-risks-of-ai-generated-code/ https://neuscorp.com/index.php/2024/04/03/mitigating-the-risks-of-ai-generated-code/#respond Wed, 03 Apr 2024 08:34:34 +0000 https://neuscorp.com/index.php/2024/04/03/mitigating-the-risks-of-ai-generated-code/ Source link

2023 has been a breakout year for developers and generative AI. GitHub Copilot graduated from its technical preview stage in June 2022, and OpenAI released ChatGPT in November 2022. Just 18 months later, according to a survey by Sourcegraph, 95% of developers report they use generative AI to assist them in writing code. Generative AI can help developers write more code in a shorter space of time, but we need to consider how much of a good thing that may be.

When we talk about AI tools for software development, right now that mostly means ChatGPT and GitHub Copilot, though there is competition from Google Bard, Amazon CodeWhisperer, and Sourcegraph’s Cody. Developers are finding success using generative AI to address common, repetitive, and low-complexity coding issues. However, these assistants fall short of understanding complex code bases, recognizing intricate patterns, and detecting complex issues and vulnerabilities.

According to early research by GitHub regarding the usage of Copilot, developers are measurably writing code faster and perceive themselves to be more productive, less frustrated, and more fulfilled. What could go wrong?

AI-generated insecure code

A study from Stanford from around the same time found that participants who had access to an AI assistant were more likely to write insecure code and more likely to rate their answers as secure compared to a control group. Meanwhile, a survey by Sauce Labs discovered that 61% of developers admit to using untested code generated by ChatGPT, with 28% doing so regularly.

So, developers are writing code faster and producing more of it with the assistance of generative AI. But they are more likely to write insecure code, while believing it to be secure, and even push it to production without testing. In 2024, it is likely we will see the first big software vulnerabilities attributed to AI-generated code. The success of using AI tools to build software will lead to overconfidence in the results, and ultimately, a breach that will be blamed on the AI itself.

To avoid such an experience, the industry as a whole needs to double down on development practices that ensure code, written by both developers and AI, is analyzed, tested, and compliant with quality and security standards. It’s important that organizations build processes that ensure code is analyzed, tested, and reviewed so that it can be trusted, regardless of how it was authored.

These practices create a buffer for developers to leverage AI code generators without the risk—both now and in the future. It’s important now because generative AI tools are new and fairly rudimentary and they require a lot of human oversight to guide them in the right direction. It’s also important in the future as generative AI, and the technology that uses it, continues to rapidly evolve. We don’t know what it will look like in the future, but we do know that without the tools and processes to keep code in check, we may not understand what we’re deploying.

Putting the focus on clean code

As the adoption of AI tools to create code increases, organizations will have to put in place the proper checks and balances to ensure the code they write is clean—maintainable, reliable, high-quality, and secure. Leaders will need to make clean code a priority if they want to succeed.

Clean code—code that is consistent, intentional, adaptable, and responsible—ensures top-quality software throughout its life cycle. With so many developers working on code concurrently, it’s imperative that software written by one developer can be easily understood and modified by another at any point in time. With clean code, developers can be more productive without spending as much time figuring out context or correcting code from another team member.

When it comes to mass production of code assisted by AI, maintaining clean code is essential to minimizing risks and technical debt. Implementing a “clean as you code” approach with proper testing and analysis is crucial to ensuring code quality, whether the code is human-generated or AI-generated.

Speaking of humans, I don’t believe developers will go away, but the manner in which they do their work every day will certainly change. The way developers use AI will be as simple and commonplace as searching Google for something as a shortcut. There’s much to be explored about the usage of modern AI, and we must consider the human element at the forefront to check AI’s drawbacks.

By ensuring AI-generated software contains clean code, organizations can help themselves from falling victim to AI’s potential downsides, like subtle bugs or security flaws, and they can derive more value from their software in a predictable and sustainable way. This is non-negotiable when the status and future of software development as a profession are intricately tied to the integration of AI.

AI has transformative potential for software development, but we must not let it run without checks—especially when digital businesses today are dependent on the software that underpins it.

Phil Nash is a developer advocate for Sonar serving developer communities in Melbourne and all over the world. He loves working with JavaScript or Ruby to build web applications and tools to help developers. He can be found hanging out at meetups and conferences, playing with new technologies and APIs, or writing open source code. Prior to working at Sonar, he was a principal developer evangelist at Twilio.

Generative AI Insights provides a venue for technology leaders—including vendors and other outside contributors—to explore and discuss the challenges and opportunities of generative artificial intelligence. The selection is wide-ranging, from technology deep dives to case studies to expert opinion, but also subjective, based on our judgment of which topics and treatments will best serve InfoWorld’s technically sophisticated audience. InfoWorld does not accept marketing collateral for publication and reserves the right to edit all contributed content. Contact doug_dineley@foundryco.com.

Copyright © 2024 IDG Communications, Inc.

(The following story may or may not have been edited by NEUSCORP.COM and was generated automatically from a Syndicated Feed. NEUSCORP.COM also bears no responsibility or liability for the content.)

]]>
https://neuscorp.com/index.php/2024/04/03/mitigating-the-risks-of-ai-generated-code/feed/ 0
Solana surpasses $200 as excitement builds for upcoming airdrop https://neuscorp.com/index.php/2024/04/03/solana-surpasses-200-as-excitement-builds-for-upcoming-airdrop/ https://neuscorp.com/index.php/2024/04/03/solana-surpasses-200-as-excitement-builds-for-upcoming-airdrop/#respond Wed, 03 Apr 2024 07:32:06 +0000 https://neuscorp.com/index.php/2024/04/03/solana-surpasses-200-as-excitement-builds-for-upcoming-airdrop/ Source link

Solana (SOL) briefly crossed the $200 mark on Sunday night, marking only the second time it has reached this threshold since 2021. This follows Solana decentralized exchange (DEX) volume recently overtaking the volume observed on Ethereum (ETH) DEXs.

The rally was short-lived, as the cryptocurrency retreated to around $190 on Monday. To set a new all-time high, Solana would need to climb to approximately $260, according to data from CoinGecko.

After months of stagnation following the collapse of FTX, Solana’s ecosystem has seen a resurgence in interest, driven by airdrops and memecoin speculation. The cross-chain messaging protocol Wormhole is set to release its W token, with a portion of the supply unlocking on the Solana blockchain. This anticipated airdrop has contributed to the increased activity on the network.

Airdrop allocation farming has played a role in the steady growth of Solana’s DeFi ecosystem. The total value locked in Solana’s DeFi protocols has been on an upward trajectory since mid-November, currently sitting at around $4.6 billion, as reported by DeFiLlama.

Solana has also experienced a significant increase in stablecoin volume, processing more than $100 billion in USDT and USDC transfers on multiple days last week, according to data from Blockworks Research.

Memecoins have become the latest trend in the Solana ecosystem, with platforms like DEX Screener enabling users to speculate on new tokens such as Slerf. This phenomenon has sparked a debate within the crypto community, with influential figures like Ethereum co-founder Vitalik Buterin weighing in on the purpose and potential of memecoins.

Institutional interest in Solana rising

Institutional interest in Solana has also been on the rise. Grayscale’s Solana Trust (GSOL) has seen its market price climb for three consecutive weeks, with its net asset value per share nearing its highest point since the product began trading in April 2023.

Grayscale has also included Solana in its recently launched staking fund, which aims to optimize staking rewards for investors. Other firms, such as 21Shares and VanEck, offer exchange-traded products that provide exposure to the Solana ecosystem.

(The following story may or may not have been edited by NEUSCORP.COM and was generated automatically from a Syndicated Feed. NEUSCORP.COM also bears no responsibility or liability for the content.)

]]>
https://neuscorp.com/index.php/2024/04/03/solana-surpasses-200-as-excitement-builds-for-upcoming-airdrop/feed/ 0
Wordle Answer for Wednesday: Avoid Spoilers by Not Clicking Here https://neuscorp.com/index.php/2024/04/03/wordle-answer-for-wednesday-avoid-spoilers-by-not-clicking-here/ https://neuscorp.com/index.php/2024/04/03/wordle-answer-for-wednesday-avoid-spoilers-by-not-clicking-here/#respond Wed, 03 Apr 2024 06:30:28 +0000 https://neuscorp.com/index.php/2024/04/03/wordle-answer-for-wednesday-avoid-spoilers-by-not-clicking-here/ Source link

Warning: If you keep reading, you’ll see the Wordle answer for Wednesday, April 3. That could be a devastating spoiler for some players. But if you just need the answer — maybe you’re on your last guess and just don’t want to see an 800-game streak go poof — keep reading.

We’ll start you off with some general tips and then hints in case you feel just getting the answer itself is cheating. If you just want the answer, scroll down to the final subhead. We’ll update every day with the newest answer.

Tips, strategies and more

I’ve written a lot about Wordle — from covering its 1,000th word to my list of the best starter words to a helpful two-step strategy to controversial word changes. I’ve even rounded up what I learned playing the hit online word puzzle for a full year. So if you’re rethinking your need for the actual answer, you might try tips from one of those stories.

Still need a starter word? One person told me they just look around and choose a five-letter object that they’ve spotted to use as their starter word — such as COUCH or CHAIR.  I tend to stick to starter words that have the most popular letters used in English words. I like TRAIN as a starter, though I have a friend who uses TRAIL. I’ve read that people use the financial term ROATE, but I like to use words I actually know.

Is Wordle running out of words?

Tracy Bennett, the Wordle editor, made a TikTok on March 28 where she addressed the possibility that the game will eventually run out of five-letter words. “Yes, there are only about 2,300+ words left in the database,” she acknowledged. But she notes that she’s added about 30 words and could add more. Bennett also says she might recycle words later on or possibly allow plurals or past tenses, which haven’t been a part of the game. (A TikTok commenter suggests the game move up to six words when the database runs out.) 

Wordle siblings, Connections and Strands

There are other fun games in the Times Games stable. My latest addiction is Connections, which I think is trickier than Wordle. This is the game where you look at a grid of 16 words and try to put them into four groups of related words. Sometimes the relationships between the words are pretty out there — like the time when it was four words that all began with rock bands, such as RUSHMORE and JOURNEYMAN. (Connections got a little sassy on April Fool’s Day with an all-emoji puzzle.)

Spelling Bee is a popular Times game too. And there’s a new game that’s still in beta, Strands, which I’m trying to master.

Wordle hints and answer

Let’s talk about the answer for today. Last chance to bow out and stop reading if you don’t want spoilers. I’ll start with some clues that don’t give it away, in order to give you a chance to still win on your own.

Wordle hint No. 1: Starts with two consonants

This answer begins with two consonants, so look for those that can go together.

Wordle hint No. 2: Two vowels

Today’s Wordle answer has two vowels, paired up, in positions three and four of the five-letter word.

Wordle hint No. 3: Meanings matter

This word can be both a noun and a verb. The verb is more popular in the US, where I hardly ever hear the noun version.

Wordle hint No. 4: Starting letter

This word begins with a “P.”

Wordle hint No. 5: Ending letter

And it ends with a “T.” 

Next, we’re giving away the answer. Last chance to look away, the answer is below the photo.

Image of Wordle welcome screen

Get ready for the answer to be spoiled.

Screenshot by Gael Fashingbauer Cooper/CNET

Wordle answer revealed

The Wordle answer for April 3 is PLAIT. Merriam-Webster gives the first definition as “pleat” and the second as “a braid.” The verb form also means to braid or to “interweave strands or locks.” Americans tend to call the resulting hairstyle braids, while in the UK, plaits is often used. And some think of braids as a simpler twist or hair, while plaits are a more elaborate version.

This word could end up being the Wordle stumper of the week.

Hope these clues helped you keep your streak going! Come back tomorrow if you’re stumped again.

(The following story may or may not have been edited by NEUSCORP.COM and was generated automatically from a Syndicated Feed. NEUSCORP.COM also bears no responsibility or liability for the content.)

]]>
https://neuscorp.com/index.php/2024/04/03/wordle-answer-for-wednesday-avoid-spoilers-by-not-clicking-here/feed/ 0
Is Truth Social planning to provide a financial bailout for Trump? https://neuscorp.com/index.php/2024/04/03/is-truth-social-planning-to-provide-a-financial-bailout-for-trump/ https://neuscorp.com/index.php/2024/04/03/is-truth-social-planning-to-provide-a-financial-bailout-for-trump/#respond Wed, 03 Apr 2024 05:27:48 +0000 https://neuscorp.com/index.php/2024/04/03/is-truth-social-planning-to-provide-a-financial-bailout-for-trump/ Source link

Trump Media lost nearly $60m last year. So how is it worth billions? We explain the ex-president’s windfall.

(The following story may or may not have been edited by NEUSCORP.COM and was generated automatically from a Syndicated Feed. NEUSCORP.COM also bears no responsibility or liability for the content.)

]]>
https://neuscorp.com/index.php/2024/04/03/is-truth-social-planning-to-provide-a-financial-bailout-for-trump/feed/ 0
HiFiMAN’s TWS450 True Wireless Earbuds Offer Incredible Value https://neuscorp.com/index.php/2024/04/03/hifimans-tws450-true-wireless-earbuds-offer-incredible-value/ https://neuscorp.com/index.php/2024/04/03/hifimans-tws450-true-wireless-earbuds-offer-incredible-value/#respond Wed, 03 Apr 2024 04:25:44 +0000 https://neuscorp.com/index.php/2024/04/03/hifimans-tws450-true-wireless-earbuds-offer-incredible-value/ Source link

Have wireless earbuds become a commodity? With so many models in the market, it has become almost impossible to keep up with all of them and our focus will remain on those that we feel offer better sound quality, improved ANC performance, and support for emerging codecs like Bluetooth aptX Lossless.

At the bottom end of the market, there really isn’t that much to recommend below $50 and many of those products have become something you lose at the bottom of a bag, or misplace on the airplane.

The new HiFiMAN TWS450 priced at only $39 USD might become the exception to the rule.

Features

Drivers: Audiophile-grade Dynamic Drivers, combined with HIFIMAN’s tuning and HIFI Sonics are designed to support clear sound. 

ENC: With HIFIMAN’s ENC (Environmental Deep Noise Cancellation), an artificial intelligence (AI) algorithm is used to filter extraneous noise while highlighting the human voice. This is great for phone calls. The TWS450 has a built-in microphone. 

Bluetooth 5.3: This provides clear and stable audio from streaming sources. SBC and ACC codecs are supported. 

Battery Life: Up to 20 Hours Battery Life (earbuds and charging case combined). Up to 5 hours (earbuds) – Additional 15 hours (charge case)

Charge Time: 1.5 hours (earbuds), 2 hours (charging case).

Weatherproofing: With an IPX4 rating the TWS450 is resistant to sweat and precipitation. 

Touch Control: Controls provided on the earbuds include play, pause, rewind to the previous track, forward to the next track, and answer/end/reject calls. 

Weight: 3.5 grams lightweight design provides comfort. 

Advertisement. Scroll to continue reading.

Included Accessories: Type-C charging cable, Extra pair of earbuds. 

HiFiMAN TWS450 Wireless ANC Earbuds in Case Front

From Dr. Fang Bian, Founder and CEO, HIFIMAN Electronics: “The TWS450 is an example of how our standout features trickle down to some of our lowest priced products,…This new earbud offers high-end performance at a remarkably affordable price.

Price & Availability

The HiFiMAN TWS450 wireless earbuds are available for $39 at HIFIMAN’s online store.

(The following story may or may not have been edited by NEUSCORP.COM and was generated automatically from a Syndicated Feed. NEUSCORP.COM also bears no responsibility or liability for the content.)

]]>
https://neuscorp.com/index.php/2024/04/03/hifimans-tws450-true-wireless-earbuds-offer-incredible-value/feed/ 0