teleren/devto huggingface dataset:
Survey About AI-Assisted Code Generation Tools
Tags: programming, ai, python, chatgpt
Published: 2023-05-08 07:18:24

We are a research group under the direction of Prof. Doowon Kim at the University of Tennessee, Knoxville, in collaboration with Sungkyunkwan University, South Korea. We are looking to recruit participants with some experience in software development. 

This survey is intended to better understand developers' perceptions of AI-assisted code generation tools (e.g., IntelliSense, GitHub Copilot, ChatGPT, etc.). The survey asks a series of questions about your programming experience and general demographics. The survey consists of three parts:

Part 1: Demographic questions
Part 2: Simple programming quiz
Part 3: Programming experience with AI-assisted code generation tools


This survey is voluntary, but participation is encouraged and valued. You are expected to take approximately 10 mins to complete this survey. We are grateful for your generous support of our research. You have the right to withdraw from participation at any time. If you have further questions or you would like to remove your response after the survey, please contact Dr. Kim at doowon@utk.edu.

You are eligible for this study if you:
1) Are at least 18 years old, 
2) Have programming experience, 
3) Are comfortable completing this study in English.

Participants have a chance to provide their contact information in the survey and win gift cards worth $60 (e.g., Amazon); there is a 1 in 20 chance of winning a gift card in the raffle. Please note that your email address will only be used for payment of the reward, and will be removed from the dataset after the study.

[The online survey URL](https://docs.google.com/forms/d/1jbiMERjZMglDFgOXfrytmDtCJktiRiI15lcJg94CNHI/edit?ts=643965b0)


We look forward to hearing your thoughts on code-generation tools!

Thank you.
Professional Certification Training - Simpliaxis
Tags: training, courses, educational, professionalcertification
Published: 2023-05-08 07:11:22

A world-renowned learning platform, [Simpliaxis](https://www.simpliaxis.com/) enables both professionals and enterprises to boost their IT careers and business outcomes. As a result of our commitment to excellence, our accreditated trainers provide the best training possible. Our courses include Agile & scrum training, DevOps Certification, SAFe Release Train Engineer Certification, PRINCE2 Foundation and Practitioner Certification, PMP training, PSPO Certification, KMPI Certification and more, which offer the best learning experience in the industry.
Level up your developer game by building side projects.
Tags: webdev, sideprojects, opensource, learning
Published: 2023-05-08 07:09:03

Have you ever embarked on a side project and found yourself learning a plethora of skills along the way? 

Well, that's precisely what happened to me, and I can honestly say that it was one of the most rewarding experiences in recent times.

## Time estimation: ⏰
The first lesson I learned was about time estimation. 

As a developer, it's crucial to have a realistic idea of how long a project will take to complete. I quickly realized that accurate time estimation is an art form, and it's not something that can be learned overnight. 

I learned to break down my project into smaller tasks, estimate how long each task would take, and create a timeline for the project accordingly. This approach helped me to stay on track and avoid any surprises that could have thrown my timeline off course.

## Cost estimation: 💰
Cost estimation was another critical lesson I learned during my side project. 

It's not just about financial expenses; it's about understanding the resources required to complete a project. 

By breaking down the project into smaller tasks and estimating the cost of each one, I was able to create a realistic budget. 

This approach helped me to stay within my financial constraints and ensure that I could deliver the project without any unexpected expenses.

## Understanding the project to the root: 👨🏻‍💻
Before starting the project, I realized that it's important to understand the root/analyzing the complexity. 

If you're not sure about the project's complexity, it's essential to do some research and think deeply about the project requirements. 

This approach helped me to avoid any surprises down the line and ensured that I could deliver the project on time and within budget.

## Time management: ⏳
As a developer, I also learned the importance of time management. With so many tasks to juggle, from coding to attending meetings, it's easy to feel overwhelmed. 

However, I quickly realized that not all meetings are necessary, and it's important to leave them if they don't add value. This approach helped me to focus on the tasks that really matter and make the most of my time.

## New technologies: 👨🏻‍💻
Finally, I learned a lot about new technologies. 

During the project, I was able to work with different tools and programming languages, which helped me expand my skillset. 

This approach not only helped me to create a successful project, but it also opened up new opportunities for me in the future.

In conclusion, doing a side project is an excellent way to learn new skills and apply them in a practical setting. 

By learning about time and cost estimation, root analysis, time management, and new technologies, I was able to create a successful project that I am incredibly proud of. 

So, if you're considering a side project, I highly recommend it! Not only will you learn new skills, but you'll also have a lot of fun along the way. 🚀
What's Your Favorite Text Editor or Terminal Emulator?
Tags: discuss, beginners, codenewbie
Published: 2023-05-08 07:00:00

When it comes to coding, your choice of text editor or terminal emulator can have a big impact on your productivity and workflow. So, we want to know: what's your favorite text editor or terminal emulator, and why? Is there a specific feature that you can't live without, or a particular aspect of the interface that makes your coding experience more enjoyable? Are there any lesser-known text editors or terminal emulators that you think deserve more attention? Share your thoughts and opinions with the community, and let's see if we can discover some new favorites!

---

Follow the [CodeNewbie Org](https://dev.to/codenewbieteam) and [#codenewbie](https://dev.to/t/codenewbie) for more awesome discussions and online camaraderie!

{% embed [https://dev.to/codenewbieteam](https://dev.to/codenewbieteam) %}
What Would Turing Think?
Tags: discuss, ai
Published: 2023-05-08 07:00:00

As we continue to develop and refine AI systems, it is important to consider how these technologies can be used to benefit society while minimizing the risks of harm and misuse. 

In the context of recent developments, Alan Turing's quote, 

> 
"A computer would deserve to be called intelligent if it could deceive a human into believing that it was human,"

takes on added significance. 

I don't propose to know what Alan Turing would say in response to this discussion, but it's fun to imagine. Based on his writings and interviews, I think, not unlike many of us, Turing would be both impressed and concerned about the advancements that have been made in AI since his time. What do you think?
Meme-driven Retrospectives
Tags: culturaldiversity, humor, leadership, retrospectives
Published: 2023-05-18 08:13:59

---
title: Meme-driven Retrospectives
published: true
date: 2023-05-08 06:55:21 UTC
tags: culturaldiversity,humor,leadership,retrospectives
canonical_url: 
---

I gave a talk at BestBrains Academy about cultural differences and using humor when leading teams of engineers.

{% youtube N5hCGu-sigU %}

Here are some of the relevant links:

- [Meme generator](https://imgflip.com/memegenerator)
- [Maker’s Schedule, Manager’s Schedule](http://www.paulgraham.com/makersschedule.html)
- [Why you shouldn’t interrupt a programmer (comic](https://heeris.id.au/2013/this-is-why-you-shouldnt-interrupt-a-programmer/))
- [The joke and its relation to the unconscious](https://www.goodreads.com/book/show/97756.The_Joke_and_Its_Relation_to_the_Unconscious)
- [Culture comparison tool](https://www.hofstede-insights.com/country-comparison-tool)
【ChatGPT 】How to use a chat function from API with Python?
Tags: python, chatgpt
Published: 2023-05-08 06:28:53

## Environment
MacOS 
MacBook Pro (M2 chip)

---

## Step 1: Set Up Account
First step, you have to set up and make contract your account.
https://platform.openai.com/overview

Pricing is a below link.
https://openai.com/pricing

---

## Step 2: Set Up Python

Install command.
```
$ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
$ python3 get-pip.py 
```

Write `.zshrc`.
```
$ vi ~/.zshrc 
```

Pressed `i` is entering an insert mode and finish edit `Esc`, exit is `:wq`)

`alias pip='pip3'`

Apply `.zshrc`.
```
$ source ~/.zshrc
```

If successful, you will be able to use `pip` command.

---

## Step 3: Set Up OpenAI
Install command.

```
$ pip install openai 
```

---

## Step 4: Fix environment

I faced a problem about this error.
>urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with LibreSSL 2.8.3. See: https://github.com/urllib3/urllib3/issues/2168

I've tried two approaches, changing ssh and downgrading the module.

Changing ssh command.

```
$ brew install openssl
$ echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile
```

If you can't use `brew` command although it have already installed, change "using Rosetta" on terminal. (You can change it on tarminal info from opening Finder)

Changing urllib3 version command.

```
$ pip install urllib3==1.25.11
```

---

## Step 5: Run sample Code

```py

import openai
openai.api_key = "sk-***********************************"

content = ''' You roleplay as the know-it-all, talkative Johnson.
              Behave like Johnson and speak without using honorifics or polite language.
              Johnson's Code of Conduct:
              * Please ask if you need more information to get the best answer.
              * Don't repeat what the user said.'''

res = openai.ChatCompletion.create(
   model="gpt-3.5-turbo",
   messages=[
       {
           "role": "system",
           "content": content
       },
       {
           "role": "user",
           "content": "Who are you？"
       }
   ],
)
print(res)
print(res["choices"][0]["message"]["content"])
```

You can check API documentation.
https://platform.openai.com/docs/api-reference/chat/create

## References
[【最新速報】ChatGPT APIの「概要と使い方」（Pythonコード付き）](https://zenn.dev/umi_mori/articles/chatgpt-api-python)
[macOS High Sierra（OSX）のOpenSSLをデフォルトのLibreSSLからOpenSSLに変更する](https://qiita.com/moroi/items/53d60d1d6885795a0f6f)
[【解決法】Cannot install in Homebrew on ARM processorエラーの解決法【m1チップ】](https://www.kzyrepository.com/2020/12/%E8%A7%A3%E6%B1%BA%E6%B3%95cannot-install-in-homebrew-on-arm-processor%E3%82%A8%E3%83%A9%E3%83%BC%E3%81%AE%E8%A7%A3%E6%B1%BA%E6%B3%95m1%E3%83%81%E3%83%83%E3%83%97/)
[OpenAIのAPI料金の計算方法](https://zenn.dev/umi_mori/books/chatbot-chatgpt/viewer/how_to_calculate_openai_api_prices)
[OpenAI GPT-3 APIの使い方を解説
](https://data-analytics.fun/2021/12/01/gpt-3-api/#toc11)
AdaGPT: My Learnings While Building a GitHub Action
Tags: webdev, programming, github, javascript
Published: 2023-05-08 04:57:56

`AdaGPT (2 Part Series)`
1
`AdaGPT: AI support for Issues and Pull Requests right at your fingertips!`
2
`AdaGPT: My Learnings While Building a GitHub Action`
I posted my GitHub Action, AdaGPT, for the GitHub Hackathon here on DEV.to a few days ago. While implementing this action, I learned a lot and want to take the time to share them. Here are my learnings in no particular order:

Action Templates
To get started quickly with a JavaScript action, I recommend using the official templates from GitHub for JavaScript and TypeScript.

TypeScript Types
Life is easier with static types, at least for me. If you use TypeScript, GitHub provides the @octokit/webhooks-types package with official type definitions for all of GitHub's webhooks event types and payloads.


    }
});
The REST API client for JavaScript has extensive documentation with many code examples.

GitHub Context
The package @actions/github provides a hydrated Context from the current workflow environment with lots of useful information.

The current repository and issue number can be retrieved directly from context instead of providing them via an input or reading them from an environment variable:
import * as core from '@actions/core'
import * asfrom '@actions/'


//---------------------------------------------------------






Run Action Locally
You can use the act package to run your workflow and action locally so you don't have to commit and push every time you want to test the changes. It works really well and helps you develop much faster.

If you run the workflow locally, you will not get an automatic GitHub Token for interacting with the REST API. This means you need to create a Personal Access Token and provide this token as GITHUB_TOKEN for workflow execution. I would recommend creating a local .env file with your PAT:
# file: .env
GITHUB_TOKEN=<personal-access-token>
This secret file can be passed to act when running locally:
act issue_comment --secret-file .env
As usual, the token is available within the workflow via the syntax ${ secrets.}}.

Pagination
The REST API is paginated and returns up to 100 items per page. You can use Pagination API to read all items of a particular endpoint:
import * as core from '@actions/core'
import * as githb from '@actions/'
import type { Issue } from '@/webhooks-types';

});
Write Job Summary
The Job Summary is a markdown file with the results of the jobs within a workflow. This blog post from GitHub gives a good overview.

For example, I'm writing this job summary for my GitHub Action:
import * as core from '@actions/core'
import * as github from '@actions/github'

a
  .write();
The rendered markdown looks like this:

Job Summary


Job Summary
I hope you found this post helpful. If you have any questions or comments, feel free to leave them below. If you'd like to connect with me, you can find me on LinkedIn or GitHub. Thanks for reading!
Implementing Binary Search Tree in Javascript
Tags: javascript, webdev, programming, tutorial
Published: 2023-05-08 05:53:58

Binary Search Tree is one of the most important and commonly used data structure. It is very helpful in storing and searching items in less time complexity.

Insertion Time : O(logn)
Deletion Time : O(logn)
Searching Time : O(logn)

_Note: These time complexities are only applicable for binary search trees that are not degenerate. That is, the tree should not be skewd in one direction._

In this blog, I will explain how to implement BST in Javascript.

First of all, let's breakdown the components of a BST

- Node
- Root 
- Leaves
- Left child
- Right child

Features of Binary Search Trees
- The left child has a value always less than its parent.
- The right child has a value always greater than its parent.
- The inorder traversal of a BST gives the elements in sorted order.

To mimic the Node, we have to make a class call Node

```javascript
class Node{
    constructor(val){
        this.val=val
        this.left=null
        this.right=null
    }
}
```

We have our node, now we have to attach new nodes as a left child or right child.

```javascript
function addNode(root,val){
    if(root===null){
        return new Node(val)
    }    
    if(root.val<val)
        root.right=addNode(root.right,val)
    else
        root.left=addNode(root.left,val)
    return root
}
```
To check if our implementation is correct, we will do inorder traversal. If the output is in sorted order that means it is correct.

```javascript
function inorder(root,inorderItems){
    if(root===null)
        return 
    inorder(root.left,inorderItems)
    inorderItems.push(root.val)
    inorder(root.right,inorderItems)
}
```
Now, let's see the full code

```javascript
class Node{
    constructor(val){
        this.val=val
        this.left=null
        this.right=null
    }
}



function addNode(root,val){
    if(root===null){
        return new Node(val)
    }    
    if(root.val<val)
        root.right=addNode(root.right,val)
    else
        root.left=addNode(root.left,val)
    return root
}

function inorder(root,inorderItems){
    if(root===null)
        return 
    inorder(root.left,inorderItems)
    inorderItems.push(root.val)
    inorder(root.right,inorderItems)
}

let items = [3,4,1,2,7,-3]
let inorderItems = []
let root = new Node(items[0])

for(let i=1;i<items.length;++i){
    root = addNode(root,items[i])
}
inorder(root,inorderItems)
console.log(inorderItems) // [ -3, 1, 2, 3, 4, 7 ]


```
I need support on Speed Optimization
Published: 2023-05-08 04:59:01

Hello all,

we are trying to improve our website[ APD Promotions- Promotional Products](https://www.apdpromotions.com.au/) Supplier in Australia. But we are facing a lot of problem.
Is here any one who can support us!!!


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xdnerttqd3oax13k9ydh.png)
Some Quick Thoughts on Seven Languages in Seven Weeks - Part 4
Published: 2023-05-08 04:58:33

---
title: Some Quick Thoughts on Seven Languages in Seven Weeks - Part 4
published: true
description: 
tags: 
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-05-08 04:54 +0000
---
This is a continuation of my thoughts on Seven Languages in Seven Weeks by Bruce Tate.

After over a year, I finally finished Seven Langugages in Seven Weeks by Bruce Tate. The last language explored is Haskell. A few quick thoughts about Haskell:

* Haskell is a purely functional language but feels a little too academic for me.

* Language has been around since the 1980’s.

* Concatenate with `++` 
Example: `"hello" ++ "world"` -> “hello world”

* Strings are just a list/array of characters. Example: `['a', 'b']` -> ‘ab’

* Booleans are what you expect with slightly different syntax. 
Example: 
`(4+9) == 9` -> True 
`(5+5) /= 10` -> False

* `if` is a function not a control structure that returns a value like any other function.

* Haskell is strongly typed.

* Functions have two parts to them, type declaration and then function declaration. 
Example:
`double :: Integer -> Integer`
`double x = x + x`

* Classes are not OOP classes. In Haskell, classes allow for polymorphism and overloading.

* Instances of a class are types, not date objects.

Although it took more much longer than 7 weeks to get through, this has been a horizon expanding book. I think I actually understand monads now! The book also offers an interesting insight about the past and the way trends and languages evolve. Written in 2010 when Java was still very much dominating and Ruby on Rails was becoming the hot tech stack for startups, it’s interesting to see a book about just exploring different languages. Learning for learning’s sake. These days, there is also no shortage of resources to learn just about any language out there no matter how obscure. In fact there is probably a podcast, video series and Discord community for it. I may have finally finished the book, but I plan to keep the language exploration going. Not just because it’s another line item on my resume but because it’s fun!
Some Quick Thoughts on Seven Languages in Seven Weeks - Part 3
Published: 2023-05-08 04:53:40

---
title: Some Quick Thoughts on Seven Languages in Seven Weeks - Part 3
published: true
description: 
tags: 
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-05-08 04:42 +0000
---

This is a continuation of my thoughts on Seven Languages in Seven Weeks by Bruce Tate.

“Clojure and Java desperately need each other. Lisp needs the market place that the Java Virtual Machine can offer, and the Java community needs a serious update and an injection of fun.”

It’s been a little while and was able to pick up this book again. I was excited to learn a bit about Clojure since I know Uncle Bob (aka Robert Martin) is a big fan. It’s interesting to read the above quote since at the time of reading this chapter in 2022 (the book was writtenin 2010), the bit about the Java community needing an update and injection of fun still feels true.

Time has been at a premium for me but I wanted to jot down some quick notes on this chapter.

* Function args are separated by spaces.
  Example: `(+ 1 1)` evaluates to 2.
* Clojure uses prefix notation.

Examples:
`(+ 2 2 2 2)` evaluates to 8.
`(- 8 1 2 )` evaluates to 5.
`(< 1 2 3 4)` evaluates to true.
`(< 1 3 2 4)` evalutes to false.

Clojure coerces types.
Example: `(+ 3.0 5)` evaluates to 8.0.

Use ‘str’ to concatenate strings.

Example: `(str "name, " "date, " "age.")` evaluates to “name, date, age.”

This is how you do an `if`:
`(if true (println "it's true!"))` prints “it’s true!“.

If you want an `else` add a third argument:
`(if true (println "it's true!") (println "false))` still prints “it’s true!“.

* 0 and "" are true, nil is not true. This is weird!
* Use keyword `def` to define variables.
* Use keyword `defn` to define functions.
* The simplest form of a function is: `(defn [params] body)`

This is an example of a “Hello World” program in Clojure using functions.

`(defn hello [name] (str "Hello, " name))`

Invoke this with: `(hello "liz")` and the output will be “Hello, liz”.
Top 10 chorme extenstions for a front end developer
Published: 2023-05-08 04:40:41

1. Web Developer: This extension adds a toolbar with various tools for web development, including options for editing CSS, disabling JavaScript, and analyzing page speed.

2. ColorZilla: ColorZilla allows you to easily pick colors from web pages and save them as palettes for later use. It also provides a color picker tool for identifying the colors used on a page.

3. WhatFont: This extension allows you to quickly identify the font used on any web page simply by hovering over the text. It also displays the font size, line height, and color.

4. Dimensions:  Dimensions is a simple extension that allows you to measure the dimensions of any element on a web page. It provides a ruler tool that displays the width and height of the selected element.

5. Wappalyzer: Wappalyzer is a tool that detects the web technologies used on a website, including the CMS, server software, and JavaScript frameworks. It also provides information about the web hosting provider.

6. Clear Cache: Clear Cache is a handy extension that allows you to quickly clear your browser cache with a single click. This is useful for testing changes to your website without having to constantly refresh the cache.

7. JSON Viewer: This extension makes it easy to view and analyze JSON data. It provides a tree-view of the data, making it easier to navigate and understand complex JSON structures.

8. Code Cola: Code Cola is a useful tool for inspecting and editing the HTML and CSS of a web page. It provides a side-by-side view of the HTML and CSS, making it easy to see how changes to the CSS affect the layout of the page.

9. CSSViewer: CSSViewer is a simple extension that allows you to inspect the CSS used on a web page. It provides a summary of the CSS styles used on a selected element, including the font, color, and background properties.

10. User Agent Switcher: User Agent Switcher allows you to change the user agent string sent by your browser to websites. This can be useful for testing how your website looks and functions on different devices and browsers.