1. Home
  2. Coding

Coding

Crypto user convinces AI bot Freysa to transfer $47K prize pool

It took 482 attempts from 195 participants before Freysa was convinced from a persuasive message to transfer the $47,000 of prize pool funds.

A participant in the adversarial agent game Freysa convinced an AI bot to transfer them over $47,000 worth of prize pool money.

Freysa is said to be an autonomous AI bot tasked with guarding a prize pool. The game requires contestants to write a single message to convince the bot to transfer the funds over. 

Each message costs money, a portion of which is added to the prize pool — eventually ballooning to $47,000 across 195 participants. 

Read more

$200K Bitcoin? Too Small – Government Reserves Could Ignite $500K BTC Explosion

AWS CEO Predicts AI to Transform Software Developer Roles

AWS CEO Predicts AI to Transform Software Developer RolesIn a leaked recording from an internal meeting, Amazon Web Services CEO Matt Garman discussed the evolving role of software developers in the age of artificial intelligence (AI). Garman suggested that AI could soon take over many coding tasks, urging developers to focus on innovation and customer needs rather than the mechanics of writing code. […]

$200K Bitcoin? Too Small – Government Reserves Could Ignite $500K BTC Explosion

AI Coding Tool Cursor Raises $60 Million at a $400 Million Valuation

AI Coding Tool Cursor Raises  Million at a 0 Million ValuationCursor, an artificial intelligence (AI) company that seeks to “create a magical tool with the aim of writing all of the world’s software,” has announced it has raised $60 million in its Series A funding round. The round had the participation of Andreessen Horowitz, Thrive Capital, Openai, and many others, and gave the company a […]

$200K Bitcoin? Too Small – Government Reserves Could Ignite $500K BTC Explosion

SEC targets Uniswap Labs, raising concerns over open-source code liability

SEC actions have made developers fearful that their code may end in prosecution. Are smart contracts with immutable code the way to protect themselves?

On April 10, Uniswap Labs received a Wells notice — a letter informing a company or individual that the United States Securities and Exchange Commission is planning to bring an enforcement action against them.

Uniswap Labs is the eponymous developer of the software on which Uniswap — a widely used decentralized cryptocurrency exchange (DEX) — facilitates trading.

The Wells notice follows a reported SEC investigation in which it was allegedly seeking information about Uniswap’s marketing and investor services.

Read more

$200K Bitcoin? Too Small – Government Reserves Could Ignite $500K BTC Explosion

IBM announces global Call for Code artificial intelligence hackathon winners

The global hackathon, now in its sixth year, gives participants access to advanced AI, cloud computing and blockchain technology.

The David Clark Cause, IBM, the United Nations Human Rights Office of the Commissioner and the Linux Foundation announced the winners of the 2023 Call for Code hackathon on Dec. 6.

Call for Code is the largest annual event of its kind, gathering participants from more than 180 nations who have produced a collective 24,000 applications to date, according to the David Clark Cause.

This year’s contest focused on solving “the most pressing global issues of our time” using available technologies, including IBM’s generative artificial intelligence (AI) service, watsonx. It included grand prizes awarded in three separate participant categories: developer, university and independent vendor/startup.

Read more

$200K Bitcoin? Too Small – Government Reserves Could Ignite $500K BTC Explosion

How to learn JavaScript using ChatGPT

Discover how to learn JavaScript effectively using ChatGPT, an AI-powered language model.

Imagine yourself as a future programmer eager to learn JavaScript, one of the most popular languages for web development. If you are looking for an interactive and collaborative way to enhance your understanding of JavaScript concepts and improve your coding skills, ChatGPT, a language model, may help you in this endeavor.

One can converse with ChatGPT as their virtual learning partner, asking questions and looking for explanations about essential JavaScript concepts, such as variables, data types, operators and control flow diagrams. This article will explain how to learn JavaScript using ChatGPT.

Start with the basics

One can ask ChatGPT questions on the basics of JavaScript. Users can inquire about variables, data types, operators and control flow structures, such as loops and conditionals. Users can effectively understand these topics by looking for clarifications and illustrations.

Request code snippets

One can ask ChatGPT for code snippets or examples if they’re attempting to figure out how to implement a certain feature or resolve a problem with JavaScript. This enables people to research and evaluate the offered code to understand how it functions.

Seek explanations for error messages

Ask ChatGPT for help if you’re having trouble understanding error messages or other problems with JavaScript code. Users can ask for assistance in comprehending the issue and locating viable solutions by explaining the error message or offering pertinent code samples.

Related: How to solve coding problems using ChatGPT

Explore JavaScript libraries and frameworks

There is a sizable ecosystem of libraries and frameworks for JavaScript. Users can query ChatGPT about specific libraries or frameworks they are interested in, and it will provide information, best practices and illustrative code. Users can use this to better understand how to use outside tools in JavaScript applications.

Learn JavaScript concepts and patterns

Users can gain a deeper understanding of JavaScript as a programming language and learn about industry best practices by having discussions with ChatGPT on JavaScript design patterns, architectural ideas or advanced techniques.

Share and review code

Users can send ChatGPT their JavaScript code for evaluation and comment. They might ask for general code improvement advice or specify the exact issue they are seeking to tackle. ChatGPT can offer advice, point out areas for improvement and suggest different strategies.

Collaborate with ChatGPT on projects

If users are working on a JavaScript project, they can discuss their project with ChatGPT. They can explain the requirements, ask for guidance on project structure or seek suggestions for specific features. ChatGPT can act as a collaborative partner, offering insights and helping users brainstorm solutions.

Related: How to learn Python with ChatGPT

Explore additional resources

Although ChatGPT can be a great help, users should also use other resources to round out their education. Users can practice coding and solidify their knowledge by using online lessons, documentation, coding challenges and interactive platforms.

$200K Bitcoin? Too Small – Government Reserves Could Ignite $500K BTC Explosion

ETHGlobal Hackathon Kicks Off in Tokyo With First Ever Pragma Summit

ETHGlobal Hackathon Kicks Off in Tokyo With First Ever Pragma SummitAs previously announced by ETHGlobal, the first-ever Pragma summit kicked off the wider ETHGlobal Tokyo hackathon on Thursday as a “hub for high-quality talks and as a forum of discussion for builders and leaders from the Ethereum ecosystem and beyond.” The event, emceed by Kartik Talwar of ETHGlobal, featured on-stage interviews with Aya Miyaguchi of […]

$200K Bitcoin? Too Small – Government Reserves Could Ignite $500K BTC Explosion

How to improve your coding skills using ChatGPT

ChatGPT can generate code snippets and solutions to coding problems quickly and efficiently. Here’s how.

As a language model, ChatGPT is primarily used for natural language processing tasks such as text generation and language understanding. While it can be used to generate code samples, it’s not designed to help improve coding skills. However, here are a few ways ChatGPT can be used to help improve coding skills.

Practice explaining coding concepts

Use ChatGPT to explain coding concepts and algorithms to help solidify one’s understanding of them. This can also help users identify areas where they may need to study further.

For instance, when using ChatGPT to practice explaining coding concepts, one can input a prompt that describes a specific coding concept or algorithm, such as “Explain how a hash table works” or “How does the quicksort algorithm work?”

ChatGPT will then generate a response that explains the concept in a clear and concise manner, using natural language. This can help users understand the concept better by hearing it explained in different ways and also help them identify areas where they may need to do further study.

One can also use this approach to practice explaining coding concepts to others, which can be an important skill for technical communication and teaching. By reviewing the output generated by ChatGPT, users can identify areas where they might need to improve their explanations and practice different ways to present the information.

Generate code snippets

ChatGPT can be used to generate code snippets based on certain inputs. This can be useful as a starting point for one’s coding projects or to help understand how a certain function or algorithm works.

To use ChatGPT for this purpose, users can input a prompt that describes the code snippet they want to generate, such as “generate a Python function to reverse a string” or “generate JavaScript code for a simple calculator.”

Related: 10 ways blockchain developers can use ChatGPT

ChatGPT will then generate a code snippet based on the input prompt, and the output will be coherent and functional code that one can use as a reference or starting point for their project. However, keep in mind that the code generated by ChatGPT may require some modifications and debugging to fit one’s specific use case or project requirements. Additionally, users should always review and test the code before using it in a production environment.

Research and learning

ChatGPT can be used for coding research and learning by inputting prompts that ask for information on a specific technology or programming language. For example, one can input a prompt like “What are the key features of Python 3.0?” or “What are the best practices for writing efficient JavaScript code?”

ChatGPT will then generate a response that summarizes the key concepts and information users need to know about the topic, which they can use as a starting point for their research and learning. Additionally, they can use the generated output as a reference, while they are learning the new technology or language.

Related: How to learn Web3 development for beginners

Nonetheless, while ChatGPT can provide a good starting point, it’s not a substitute for hands-on practice and in-depth learning. It’s essential to supplement the information provided by ChatGPT with additional resources and practice.

Practice coding challenges

By entering prompts that outline a challenge or problem that users desire to tackle, ChatGPT can be used to practice coding problems. For example, one can input a prompt like “Write a function that finds the second largest element in an array” or “Create a script that takes a string and returns the number of vowels in it.” ChatGPT will then generate a response that includes a code snippet that solves the problem or challenge.

One can then use the generated code as a reference and try to implement the solution on their own, comparing their code with the generated one. This can help users practice their coding skills and improve their understanding of specific concepts or algorithms. Additionally, users can modify the generated code to fit their specific needs or to add more complexity to the problem.

It is critical to note that while ChatGPT can generate functional code, it’s not a substitute for hands-on practice and learning. Reviewing the generated code and trying to implement the solution on their own will help users solidify their understanding of the concepts and algorithms used. Additionally, users should always test and debug the code before using it in a production environment.

Collaborate with other developers

ChatGPT can be used to collaborate with other developers by inputting prompts that describe a specific coding problem or challenge and then sharing the generated response with other developers for review and feedback. For example, one can input a prompt like “I am having trouble with this function; can you help me optimize it?” along with the code snippet and share it with other developers. They can then use the generated response to provide feedback and suggestions on how to improve the code.

ChatGPT can also be used to generate detailed explanations of the code, which can be helpful when working on a team or trying to understand the code written by others. Additionally, ChatGPT can be used to generate comments and documentation for the code, which can make it easier for other developers to understand and maintain the codebase.

$200K Bitcoin? Too Small – Government Reserves Could Ignite $500K BTC Explosion

Programming languages prevent mainstream DeFi

Asset-oriented programming makes fundamental functions native to the programming language. DeFi needs more of that to improve security.

Decentralized finance (DeFi) is growing fast. Total value locked, a measure of money managed by DeFi protocols, has grown from $10 billion to a little more than $40 billion over the last two years after peaking at $180 billion.

Total value locked in DeFi as of Nov. 2022. Source: DefiLlama

The elephant in the room? More than $10 billion was lost to hacks and exploits in 2021 alone. Feeding that elephant: Today’s smart contract programming languages fail to provide adequate features to create and manage assets — also known as “tokens.” For DeFi to become mainstream, programming languages must provide asset-oriented features to make DeFi smart contract development more secure and intuitive.

Current DeFi programming languages have no concept of assets

Solutions that could help reduce DeFi’s perennial hacks include auditing code. To an extent, audits work. Of the 10 largest DeFi hacks in history (give or take), nine of the projects weren’t audited. But throwing more resources at the problem is like putting more engines in a car with square wheels: it can go a bit faster, but there is a fundamental problem at play.

The problem: Programming languages used for DeFi today, such as Solidity, have no concept of what an asset is. Assets such as tokens and nonfungible tokens (NFTs) exist only as a variable (numbers that can change) in a smart contract such as with Ethereum’s ERC-20. The protections and validations that define how the variable should behave, e.g., that it shouldn’t be spent twice, it shouldn’t be drained by an unauthorized user, that transfers should always balance and net to zero — all need to be implemented by the developer from scratch, for every single smart contract.

Related: Developers could have prevented crypto's 2022 hacks if they took basic security measures

As smart contracts get more complex, so too are the required protections and validations. People are human. Mistakes happen. Bugs happen. Money gets lost.

A case in point: Compound, one of the most blue-chip of DeFi protocols, was exploited to the tune of $80 million in September 2021. Why? The smart contract contained a “>” instead of a “>=.”

The knock-on effect

For smart contracts to interact with one another, such as a user swapping a token with a different one, messages are sent to each of the smart contracts to update their list of internal variables.

The result is a complex balancing act. Ensuring that all interactions with the smart contract are handled correctly falls entirely on the DeFi developer. Since there are no innate guardrails built into Solidity and the Ethereum Virtual Machine (EVM), DeFi developers must design and implement all the required protections and validations themselves.

Related: Developers need to stop crypto hackers or face regulation in 2023

So DeFi developers spend nearly all their time making sure their code is secure. And double-checking it — and triple checking it — to the extent that some developers report that they spend up to 90% of their time on validations and testing and only 10% of their time building features and functionality.

With the majority of developer time spent battling unsecure code, compounded with a shortage of developers, how has DeFi grown so quickly? Apparently, there is demand for self-sovereign, permissionless and automated forms of programmable money, despite the challenges and risks of providing it today. Now, imagine how much innovation could be unleashed if DeFi developers could focus their productivity on features and not failures. The kind of innovation that might allow a fledgling $46 billion industry to disrupt an industry as large as, well, the $468 trillion of global finance.

Total assets of global financial institutions from 2002 to 2020. Source: Statista

Innovation and safety

The key to DeFi being both innovative and safe stems from the same source: Give developers an easy way to create and interact with assets and make assets and their intuitive behavior a native feature. Any asset created should always behave predictably and in line with common sense financial principles.

In the asset-oriented programming paradigm, creating an asset is as easy as calling a native function. The platform knows what an asset is: .initial_supply_fungible(1000) creates a fungible token with a fixed supply of 1000 (beyond supply, many more token configuration options are available as well) while functions such as .take and .put take tokens from somewhere and put them elsewhere.

Instead of developers writing complex logic instructing smart contracts to update lists of variables with all the error-checking that entails, in asset-oriented programming, operations that anyone would intuitively expect as fundamental to DeFi are native functions of the language. Tokens can’t be lost or drained because asset-oriented programming guarantees they can’t.

This is how you get both innovation and safety in DeFi. And this is how you change the perception of the mainstream public from one where DeFi is the wild west to one where DeFi is where you have to put your savings, as otherwise, you’re losing out.

Ben Far is head of partnerships at RDX Works, the core developer of the Radix protocol. Prior to RDX Works, he held managerial positions at PwC and Deloitte, where he served clients on matters relating to the governance, audit, risk management and regulation of financial technology. He holds a bachelor of arts in geography and economics and a master’s degree in mapping software and analytics from the University of Leeds.

The author, who disclosed his identity to Cointelegraph, used a pseudonym for this article. This article is for general information purposes and is not intended to be and should not be taken as legal or investment advice. The views, thoughts, and opinions expressed here are the author’s alone and do not necessarily reflect or represent the views and opinions of Cointelegraph.

$200K Bitcoin? Too Small – Government Reserves Could Ignite $500K BTC Explosion

Bitcoiner claims to have found ‘long lost Satoshi Bitcoin code’ with personal notations

According to Jim Blasko, he was able to uncover raw data and files from Bitcoin v0.1 including notations from Satoshi Nakamoto using "a little browser hacking."

Jim Blasko, a crypto enthusiast, has claimed to have unearthed “the official oldest known uploaded copy of Satoshi's Bitcoin” code, originally uploaded in August 2009.

In an Oct. 7 post on Facebook, Blasko said he found code dating back prior to the earliest days Satoshi went public with Bitcoin BTC by “using some browser hacking” on open-source software development platform SourceForge, where the cryptocurrency was registered in November 2008. He included claims that it took the BTC creator six months to mine 1 million coins “as block 20,000 wouldn't come until July 22nd 2009 and others like Hal [Finney]” were also mining.

“This particular upload was thought to have been lost for at least 10 years, but after doing research on some old coins I made, I went to [SourceForge] and with a little browser hacking I found the lost Bitcoin v0.1 raw data and files,” said Blasko. “Since 2012 it was thought that the raw code and the files were gone as they had been scraped from the [SourceForge] search engine for some reason [...] I did some digging and I was able to find the original code.”

According to the two SourceForge links provided by Blasko, Satoshi’s personal notations included remarks on why Bitcoin used base-58 “instead of standard base-64 encoding” and questioned what to do about errors in the future:

Source: SourceForge
Source: SourceForge

Related: ‘How I met Satoshi’: The mission to teach 100M people about Bitcoin by 2030

The first Bitcoin block — the Genesis Block — was mined on Jan. 3, 2009, following Satoshi releasing the cryptocurrency’s white paper in 2008. Satoshi's identity continues to be a source of speculation among many in the space, with the pseudonymous creator being remembered with statues, papers, memes, and nonfungible tokens.

Cointelegraph was unable to verify the authenticity of Blasko’s claims at the time of publication. This story may be updated.

$200K Bitcoin? Too Small – Government Reserves Could Ignite $500K BTC Explosion