teleren/devto huggingface dataset:
Beautiful Pointers
Tags: computerscience, todayilearned, c
Published: 2020-05-08 13:51:55

### Basics

Pointers are an amazing. C allows the programmer to reference the location of objects and the contents of those location using `pointers`. A pointer is like any other data type in `C`. The value of a pointer is a memory location, similar to how the value of an integer is a number. Let's see an example
		
    int money = 10
    pntr_money = &money

    pntr_money - is an integer pointer which would hold the address of money which is &money.
    *pntr_money - points to the value in the variable money which is 10.


### More details

Consider `pntr_money` is a pointer to an integer as shown above. Then `pntr_money + 1` is a pointer to an integer immediately following the integer `*pntr_money` in memory, and `pntr_money - 1` is the pointer to an integer immediately preceding `*pntr_money`.

Let us consider a machine which uses byte addressing, an integer requires 4 bytes and the value of pntr_money is 100(that is, pntr_money points to the integer *pntr_money at location 100).
    
    pntr_money = 100
    pntr_money - 1 = 96
    pntr_money + 1 = 104
    pntr_money + 2 = 108

    *(pntr_money - 1) = Contents of the 4 bytes 96, 97, 98 and 99 interpreted as an integer.
    *(pntr_money + 1) = Contents of the 4 bytes 104, 105, 106 and 107.




Another thing to remember is the difference between `*pntr_money + 1` and `*(pntr_money + 1)`
   
    *pntr_money + 1 - This will increase the value in pntr_money by 1
    *(pntr_money + 1) - This will point to the value at the address which is (pntr_money + 1)


### Example

Pointers play a prominent rule in passing parameters to functions. Most parameters passed to a function are by value but if we wish to modify the value of the passed parameter we must pass the address of the parameter which is what pointers help with.

Here is an example to understand better -

![Program](https://dev-to-uploads.s3.amazonaws.com/i/ly8cn0axyh7ng3fdlex7.png)

  * Line 2 prints `5`.
  * Line 3 invokes `funct` and the value passed is the pointer value `&x`.This is the address of `x`.
  * The parameter of `funct` is `py` of type `int *`.
  * Line 7 increments the integer at location `py`, however the value of `py` which is `&x` remains the same. Thus `py` points to the integer `x` so that when `*py` is incremented, x is incremented.
  * Line 8 prints `6`.
  * Line 4 also prints `6`.


Hence, Pointers are the mechanism used in C to allow a called function to modify variables in a calling function.
How do you balance professional work and open source?
Tags: discuss, watercooler, chat
Published: 2020-05-08 13:48:38

---
title: How do you balance professional work and open source?
published: true
description: Let's chat about open source and professional work.
tags: discuss, watercooler, chat
---
Hey dev.to community. Obviously the answer to the title is extremely subjective. Everyone leads different lives, and holds different values. We're amongst some of the lucky few where there's a hobbiest community surrounding our professional line of work. For those of you that participate in both, how do you go about balancing the two? How do you balance the two with your personal life? Since the beginning of the year, I've put more effort towards open source, than I have in the last two years combined. I don't regret it by any means. I've met some cool people, worked on some great projects and grown exponentially. But with that I try to be mindful of how much time I give from week to week, so that I still maintain my personal life. For me, that usually means only one or two days of contributions towards open source projects per week.

Let's hear from you guys. Where do you strike a balance?

---
Find me on [Twitter](https://twitter.com/FastFlowZ) | [LinkedIn](https://www.linkedin.com/in/dakota-lewallen/)
Like the article? [Buy me a coffee!](https://www.buymeacoffee.com/iamflowz)
Learn a new skill & win twice! 
Tags: apl, competition, students
Published: 2020-05-08 13:45:07

---
title: Learn a new skill & win twice! 
published: true
description: Invitation to participate in the APL Problem Solving Competition
tags: APL,Competition,Students
---
Do you want to challenge your programming and problem-solving skills in a fun, brain-teasing competition? 
Then join the 12th annual APL Problem Solving Competition and compete for
cash prizes and a trip to attend the annual Dyalog Ltd user meeting. You have until 31 July 2020 to submit your entry.

See http://www.dyalogaplcompetition.com/ for more information. 

NB: There are even cash-prizes available for referrers! ;)

<i>(I said "win twice" because you will (1) win experience through the process and (2) may even win the contest...)</i>
Drupal Development
Tags: drupal, drupalcompany, drupaldevelopment
Published: 2020-05-08 13:40:49

Our pursuit of success is driven by an innovative approach followed by our expertise that helps you to redesign your enterprise solution. We align technology, speed, and agility to meet your business needs; for now and in the future too. 

We AddWeb Solution, an expert into Drupal development services are to streamline your enterprise process and deliver better. With the perfect blend of expertise and experience, we drive better value for you. 

Hire Drupal Development Company: https://addwebsolution.com/drupal-development-services
Kill distractions while coding at home with this book
Tags: career, books, motivation, watercooler
Published: 2020-05-10 16:36:01

---
title: Kill distractions while coding at home with this book
description: Make Time is a fun read full of strategies for getting more out of your day. You'll be more productive at work and more present when you're not working.
published: true
date: 2020-05-08 13:13:00 UTC
tags: career,books,motivation,watercooler
canonical_url: https://raddevon.com/articles/kill-distractions-while-coding-at-home-with-this-book/
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/2hzisg67978582fsa629.jpg
---
{% youtube QQSlI5T0644 %}
Make Time
---------

_Make Time_ is a fun read full of strategies for getting more out of your day. You’ll be more productive at work and more present when you’re not working. The strategies are helpful for anyone, but being disciplined is critical when you work remotely since there’s no threat of a manager peeking over your shoulder.

_Make Time_ is a great companion to the last book I looked at, [Atomic Habits](https://raddevon.com/articles/web-dev-book-club-atomic-habits/).

If you’re interested in this book, I wrote an article about [my focus system](https://raddevon.com/articles/focus-for-better-work-life-balance-as-a-web-developer/).

Buy your own copy of _[Make Time](https://bookshop.org/a/2969/9780525572428)_.

If this stuff is interesting to you, you might like [my method for building a custom focus system](https://raddevon.com/articles/focus-for-better-work-life-balance-as-a-web-developer/).
do you think almost all software ideas already exist in the market?
Tags: discuss, productivity, codenewbie
Published: 2020-05-08 13:29:03

Anytime I come up with a new idea that I think will solve a problem, i find that it already exists, in fact a lot of products exist for that solution. This brings about a loss of enthusiasm to build the project

When you visit the playstore or the istore, you find that almost all softwares the mind can think of already exist. 

Sometimes I ask that, if most of the software we need already exist on the market, what new software are new computer science and developers going to build? 
and what about the young ones who have yet to study coding.

What do you think? Do you think that there is still a lot of new software yet to bebuilt?
Android Wireless Debugging (Flutter + MAC + VsCode)
Tags: mac, androiddebugbridge, vscode, flutter
Published: 2020-06-27 08:41:48

---
title: Android Wireless Debugging (Flutter + MAC + VsCode)
published: true
date: 2020-05-08 13:23:27 UTC
tags: mac,androiddebugbridge,vscode,flutter
canonical_url: https://medium.com/innovation-incubator/android-wireless-debugging-flutter-mac-vscode-2e35b9cd074b
---

![](https://cdn-images-1.medium.com/max/1024/1*BxX2fvhmNvpj21i13nlC4w.png)

This article is purely for Mac Users who develop flutter apps in MacBook with VScode.

Follow the steps below to get done.

#### Step 1: Install ADB

ADB stands for “Android Debug Bridge,” and it is a command-line tool that is used to communicate with a smartphone, tablet, smartwatch, set-top box, or any other device that can run the Android operating system (even an emulator). The computer with ADB can send commands to our device through the USB cable and wirelessly for debugging

the easiest way to install ADB is

- Install homebrew

```
ruby -e "$(curl -fsSL [https://raw.githubusercontent.com/Homebrew/install/master/install](https://raw.githubusercontent.com/Homebrew/install/master/install))"
```

- Install ADB

```
brew cask install android-platform-tools
```

- run adb --versioncommand in terminal to ensure ADB has been installed

![](https://cdn-images-1.medium.com/max/637/1*NYq7RM0bjwVxCFlET7LQBA.png)

#### Step 2: Install ADB interface for VScode

- Search for ADB interface in the Extensions of VScode

![](https://cdn-images-1.medium.com/max/976/1*jlUuuAI4CMiNPEOGJJPR1Q.png)

- Select the above Extension and install

#### Step 3: Wireless debugging

Before we start wireless debugging make sure that your android phone is in developer mode and “debugging” and “wireless debugging” options are toggled on.

Also, both the computer and android device must be connected to the same WiFi.

![](https://cdn-images-1.medium.com/max/1024/1*nPmzgLIqFr1NyGsnmltJUQ.jpeg)

Now follow the steps given below…

1. Open VScode
2. Connect an Android device to the computer using a USB cable
3. Open Command Palette ( command + shift + P)

![](https://cdn-images-1.medium.com/max/1017/1*_YM-gl4nIC03gCt0VoowZg.png)

4. Select the commands given below from the command palette

- ‘_ADB: Disconnect from any device’_
- ‘ADB: Reset connected devices port to:5555

5. Now disconnect the Android device from the computer and Select the command below from the Command Palette

- ‘ADB: Connect to device IP’

6. Enter the IP address of the Android device when prompted

![](https://cdn-images-1.medium.com/max/1015/1*0lJmTIJAGZe5ADY97hLCYQ.png)

(you can find the IP address of the android device from its \*settings>status )

You may have to wait for a while to start.

#### Enjoy Android wireless debugging……………

* * *
June 2020 Blank Calendar 
Tags: blankcalnedar
Published: 2020-05-08 13:21:34

For avoiding to miss any activities in June, you'll use a June 2020 Blank calendar to rearrange everything easily. If you would like to experience the effect of getting a calendar, just download a June 2020 calendar with holidays, and stop worrying about being forgetful or unplanned anymore. you'll save your June 2020 calendar in PDF or JPG format on your computer after downloading it. Then you'll easily print it through a printer attaching together with your computer. If you would like to require a glance at the special days of the last month, you'll download the May 2020 calendar, if you would like to plan next month beforehand you'll download and print the July 2020 printable calendar.
Hacky Friday Stuff #8.05.2020
Tags: ruby, rails, javascript, fridaystuff
Published: 2020-05-08 13:14:35

*Links about web development, product engineering, tools and services from all over the internet.*

[A May of WTFs in Rails](https://weblog.rubyonrails.org/2020/5/7/A-May-of-WTFs/)
Join and help everyone who’s interested in transforming the raw energy of frustrations in Rails into gleaming patches to documentation, error messages, or even APIs. Rails core team will take WTFs as input and produce 💖 as output.

[GitHub Codespaces](https://github.com/features/codespaces)
Get the full Visual Studio Code experience without leaving GitHub.

### Articles & tutorials
[GitHub Repos That Every Developer Should Know About](https://medium.com/better-programming/github-repos-that-every-developer-should-know-about-3f0bc8c316ba)
A handpicked list of repos that’ll help you become a better all-around developer.

[Mocking is a Code Smell](https://medium.com/javascript-scene/mocking-is-a-code-smell-944a70c90a6a)
This is part of the “Composing Software” series on learning functional programming and compositional software techniques in JavaScript ES6+ from the ground up. It covers common mistakes of building modular applications using mocks and TDD approach.

[Hanami 2 Application Template](https://timriley.info/writing/2020/05/07/sharing-my-hanami-2-application-template/)
If you want to begin exploring the ideas and features of Hanami 2, all while the framework is still under active development, this template is a great way to get started!

[Avoiding Memory Leaks in NodeJS: Best Practices for Performance](https://blog.appsignal.com/2020/05/06/avoiding-memory-leaks-in-nodejs-best-practices-for-performance.html)
In this blog post, we will look at what memory leaks are and how you can avoid them in your NodeJS application. Though this is more focused on NodeJS, it should generally apply to JavaScript and TypeScript as well. Avoiding memory leaks helps your application use resources efficiently and it also has performance benefits.

[React.js: reduce your javascript bundle with code splitting](https://medium.com/kaliop/react-js-reduce-your-javascript-bundle-with-code-splitting-f2d24abd42b8)
If you have a performance problem because of the JS bundle size then this article will show you how to deal with it.

### Gems & libraries
[Lockbox](https://github.com/ankane/lockbox)
Modern encryption for Rails.

### Podcasts
[Full Stack Radio | 139: Alex DeBrie - DynamoDB for Relational Database Diehards](http://www.fullstackradio.com/139)
In this episode, Adam is talking to Alex DeBrie about DynamoDB, and how it compares to relational databases like MySQL.

[Outside The Valley. Episode 25 | All About Pair Programming: AMA with Ben Orenstein of Tuple](https://arc.dev/blog/podcast-ep25-tuple-ben-orenstein-pair-programming-9bop8zl5t8)
This episode replays live AMA session with Ben Orenstein, co-founder and CEO of [Tuple](https://tuple.app)! It covers a lot of grounds in this session, including the benefits of pair programming in remote teams, best practices in pairing, the ups and downs of running a bootstrapped startup, and more!
My first lambda function with dev.to API
Tags: lambda, dev, api, netlify
Published: 2020-05-08 12:42:17

---
title: My first lambda function with dev.to API
published: true
description: I'm gonna create my first lambda function to fetch my dev.to data via new DEV's API
tags: lambda, DEV, API, Netlify
---

I'm gonna start this article by mentioning [this great article](https://codeburst.io/write-and-deploy-your-first-serverless-function-within-10-minutes-or-less-d7552fcd6550) by {% user danivijay %}

So this example will be more or less the same but, instead return a simple `Yey!` string, we will fetch DEV's API to get my personal data.

DEV's endpoints are listed [here.](https://docs.dev.to/api/#operation/getUser)
I'm gonna call my file as `DEV_profile.js` and inside I'll put this:
```javascript
const https = require("https");

const options = {
  hostname: 'dev.to',
  path: '/api/users/me',
  headers: { 'api-key': 'YOUR_AMAZING_TOKEN' }
}

const getProfile = (event, context, callback) => {
  // Just a guard to prevent other verbs
  if (event.httpMethod !== 'GET') return

  const req = https.request(options, res => {
    let content = ''
    res.setEncoding("utf8");

    res.on('data', data => (content += data));

    res.on('end',
      body => callback(null, { statusCode: 200, body: content })
    );
  })
  
  req.on('error', error => console.error(error))
  req.end();
};

module.exports = { handler: getProfile }
```

**Disclaimer:** _I'm not a backend developer_ so I'm not sure what I'm doing  🤪 but to handle CORS issues I'm gonna adding some lines to end of the file:
```javascript
const middy = require('@middy/core')
const cors = require('@middy/http-cors')

/**
 * Let's "middyfy" our handler, then we will be able to attach middlewares to it
 * and Adds CORS headers to responses
 */
const handler = middy(getProfile).use(cors())

module.exports = { handler }
```
Following [this article](https://www.serverless.com/blog/cors-api-gateway-survival-guide/#cors-response-headers) helped me a lot during development.

##Finally you can watch the result [here.](https://compassionate-mcclintock-1baa33.netlify.app/.netlify/functions/DEV_profile)

That's all 👋 👋
How to Become a Blockchain Developer: Expert Advice to Refactor Your Skills
Published: 2020-05-08 12:41:53

Here, in this post, we are going to share our expert advice to expand your skills and become a blockchain developer. Continue reading for a complete guide to step in this advanced development world.

1. Understand the Basics
2. Know the Types of Blockchain developers
3. Familiarize yourself with different Blockchain
4. Spend time learning Development Tools & Libraries
5. Understand the Data Structures
6. Get a good understanding of Smart Contracts & Solidity
7. Set deadlines and start with Blockchain technology

If you want to know more in details, let me know your queries in the comments.
https://steemexperts.com/how-to-become-a-blockchain-developer-expert-advice-to-refactor-your-skills-steem-experts/
Next.js Building a Car Trader App #2: Car Details Page
Tags: javascript, react, typescript, nextjs
Published: 2020-05-08 12:38:14

The second episode of our series "Building a Car Trader app using Next.js" is now available.

The application has a FAQ, search page, a list of cars with filters and a car details page which we built in this episode.

I highly recommend you watch the first episode if you didn't in order to understand the full application.

I hope you find it helpful :)

{% youtube QnGLMLFjk9Q %}
Download attribute
Tags: blob
Published: 2020-05-08 12:34:09

Here is another way to download stuff created dynamically using "download" attribute

```html
<a download="hello.txt" href='#' id="link">Download</a>

<script>
  let blob = new Blob(["Hello, world!"], {type: 'text/plain'});
  link.setAttribute("download", link.getAttribute("download"))
  link.href = URL.createObjectURL(blob);
</script>
```
You can test it here : [ForceDownload](https://flems.io/#0=N4IgzgpgNhDGAuEAmIBcIB0ALeBbKIANCLAPYB2YpMaJ1UAhgA6QrEBmAljGGgNqhyDXBFrY8BYmXKIZtADrkAPAwAESUgHdyUUgyQBeeSCzRdGeAA94x1VgBOEdgYDkAYherOh41E7kAa2MAPgARLR09JCUAegZgxUUlMFh7TiZ4BPJVVRh4VQAjXQLVA1VyCE1VACFigAo+YwAJM1JCVU1SeygkAEJjAF124HgATyYIVFUXRGsYpkZ-FwBfAEoAbkUcv0CMSHgAQXh4NIKAV0Q64w1tXX1jdp2AjABzCEPj04uIK5AbyPuIFWqy2uX8zwcTlKqgAqgAlAAyGFSEAYiAA8gUAFZweDwhF1IqkAobJIxFJpDLBIjgaC4zgUXjoADsqAAnCBloRBMJROgMFjeFIKLJ4LROdyQEIRGJYGAhXQZBA5OhOQNlkA)
JS compiled language
Tags: javascript, beginners
Published: 2020-05-08 12:30:12

---
title: JS compiled language
published: true
description: compiling code JS
tags: javascript, beginners
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/yqd5i0rukjb0sllvqt8v.jpg
---
The history teaches us that the compiler processes the code in three stages:
###Lexing
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/ewb9cu881rcbdjvo3xco.png)
As in the image above, in this phase, we convert our program into meaningful **tokens**.
###Parsing
Here we take a stream of tokens (array) and trasform it into an abstract syntax tree called AST that represent the grammatical structure of the program.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/ecfv2c8oggljyxezuw7j.jpg)
###Code Generation
Here JavaScript convert AST into a set of machine instruction.
Between parsing and code generation, JavaScript optimizes performance, execution and does also other cool stuff, all in a millisecond.
If you want take time to understand JavaScript engines look this awesome video from [JS config Franziska Hinkelmann](https://www.youtube.com/watch?v=p-iiEDtpy6I&feature=emb_title)
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/uqh3yryzyihp4wully12.png)
Project Sketches
Tags: devrel, writing
Published: 2020-05-08 12:17:02

Like a good 100k+ of you out there, I follow the excellent “learn in public” advocate [Emma Bostian](https://dev.to/emmabostian). If you don’t follow her, go raise that number. She shared a Tweet that is more of a “meme” among developers than anything else at this point. The classic syndrome of the "project graveyard" of personal Github repos.

{% tweet 1258649502493413376 %}

If you haven't seen this actual meme that somewhat painfully describes the problem, well, here you go. It's one of my favorites.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/exl94fphai9xb3clkmad.jpg)

To be honest, the vast majority of my projects never even make it to Github, to begin with. The new unlimited private repositories are starting to change that, thank you Github!

But why? Why do we feel this way? Why do we as developers hold on to this notion that our projects need to be world-changing endeavors that just need a pitch deck and cheesy .io domain to go on to greatness?

> Let's stop even calling them full side-projects and just call them "project sketches."

{% twitter 1258651396603359233 %}

Yes, I liked something I tweeted so I wrote an article about it. Even worse, it was just something I replied. 🤦🏻‍♂️

## Be Bold

But the point is real. We don't call drawings in a sketchbook "masterpieces in progress", sometimes it's worth just coding something for the exercise. You will draw a lot of circles and triangles on paper [before you finish drawing the owl](https://twitter.com/DesignUXUI/status/490179377099845632?s=20).

So, feel free to explore. Make a blog with one page and one post if you want to, create buttons that don't actually do anything and simple exercise in this powerful medium that we have. Don't be afraid to share a sketch - and to be able to call it a sketch! Not everything needs to be a WIP.

### Shameless Plug
_Justifying writing this at work_

I recently released a small CLI for bootstrapping projects AND sketches using [the CMS that I work for](https://graphcms.com/). It's a great way to get pixels on the page, quickly.

I used `npx create-gcms-app with-nextjs` to build and deploy this in less than 10 minutes. Five minutes for a coffee and choosing the name, 'cause, naming things is hard. A few of those minutes to figure out why `100vh` gave me overflow. Sketches.

So here you go, a project sketch, with cool developer domain and pitch deck all in one.

https://gobebold.now.sh/

{% codesandbox 2e85l %}

---

Thanks for reading. If you like this, [follow me on Twitter](https://twitter.com/motleydev).

Also, PS, [the company I work for is hiring](https://graphcms.recruitee.com/)!
Practice using markdown while 
creating the habit of taking 
notes for current projects.

Tags: help, codenewbie, testing
Published: 2020-05-08 12:05:23


#Start taking notes using Markdown syntax

This has multiple functionality. 
1. You're practicing using Markdown syntax
 * This will help you if you're new to Markdown like myself
2. Your notes can now turn into a blog
 * Like I'm doing here
3. Another way to create content once
 * Content creators make the world go round
4. Your newly created content will help new developers
 * This will show them how things can be done
5. Last but not least. The notes you're taking will help you focus on completing your project.

###Here's how I do it
```js
***Externship Project***
* Add username to intermediary table
* Reconfigure cshtml files to allow selection of new attributes
* Stop getting sidetracked on Twitter
* Do what your notes say, now!
```
👇This is what it will look like

***Externship Project***
* Add username to intermediary table
* Reconfigure cshtml files to allow selection of new attributes
* Stop getting sidetracked on Twitter
* Do what your notes say, now!

#Feedback
If you have it, I'd love to hear it, especially if I am incorrect on any of my statements. I'm forever learning. Thanks for reading. Have a blessed day.