teleren/devto huggingface dataset:
Welcome
Published: 2020-11-22 20:14:04

# Welcome
Since this is my first post, I just want to quickly welcome you to my blog. Thanks for visiting!

I'm an iOS developer, and while I'm relatively new to the industry, I'm not new to coding. I've been a hobbyist for a long time. So I know that there are a ton of blogs and tutorials out there covering all kinds of topics in all sorts of ways.

I mention this because I don't want to create another blog that's rehashing the same things. I feel it's important to say that I think those blogs and tutorials are GREAT. I think it's important for people to continue to write them, because:
1. They are helpful, especially for people who are just starting to learn, but also for people who may have forgotten something and are looking for a refresher, or those who are exploring something and will come across a unique take in one of these posts that will spark something in them. If we're helping each other, we're doing something right!
2. They are helpful for their authors as well. Some of my non-coding skills include teaching and writing, so I know first hand what is probably a cliché now but is still true nonetheless - to teach is to learn twice. The process of writing something down to present to others is *tremendously* beneficial because you are forced to think things through in such a way that you can't help but notice what you've glossed over before.

So there will likely be some tutorial-type posts from me in the future, but I'm not going to write them just because I have nothing else to write.

Instead, I'm going to write about what I'm working on, what I'm thinking about, and what I've discovered and found useful. The world of software development is GINORMOUS, and that's true even of the sub-world of iOS (et al) and Swift. I have a lot of exploring to do. New things are released continually. Let's figure some of it out together and build each other up along the way.
All the projects I made till date as a beginner web developer.
Published: 2020-11-23 04:29:12




## Project 1: InstaFocus:

Hosted Link is [here: ](https://instafocus.netlify.app/)


Tech used: html, css, bootstrap
### Description: 
This is a mobile responsive saas landing page 

### Motivation behind:
I always wanted an option on social media to turn off the feed ands stories but something like this does exists for youtube [here](https://chrome.google.com/webstore/detail/remove-recommendations-yo/hfnghnjkcpgagjbiheidccjnneoipbmb) (called feed remover)

## Project 2: JS drumkit

Hosted link is [here](https://deepakdrum.netlify.app/)

### Description

Basically allows you press a key on keyboard and plays the corresponding sound attached to the keys. 

### Motivation behind:

Why buy a piano when you can build your own?



## Project 3: Mobile responsive personal site 

Hosted link is [here](https://deepakpoojary1.netlify.app/)



Tech used: css, html
Explain Java annotations and how to use them like I'm 5.
Tags: java, help, watercooler, explainlikeimfive
Published: 2020-11-23 04:28:19

I know a popular one is `@Override`, but other times, when defining an interface I see `@interface Name { /* ... */ }`.
And sometimes I see random annotations I don't even know (the only one I know is `@Override`).

Can someone please teach my what these are, how to use them, etc...?

<b><div>
#<b><center><b>Thanks!<br/>Cheers!</b></center></b>
</div></b>
Random Forest Algorithm Overview
Published: 2020-11-23 04:27:07

**Random Forest Overview**

Random forest is an ensemble learning algorithm and can be applied for classification and regression problems. Ensemble methods consist of several machine learning algorithms and they tend to improve prediction performance compared to single algorithms. Random forest combines the following methods: bagging, random features selection, and decision trees. Let's describe each component separately.

**Bagging**

Bagging is an abbreviated form of Bootstrap aggregation. It represents a random selection of data points with replacement. For example, if we have a dataset with 1000 observations we randomly select 1000 observations, but with replacement. So our sampled dataset will have around 2/3 of the original 1000 observations and the remaining 1/3 will be duplicates of 2/3. 
We repeat creating bootstrap sampled data sets multiple times and the sampled datasets will define the number of decision trees in the ensemble. The default number of estimators in sklearn is 100 for both regression and classification (since [scikit-learn](https://scikit-learn.org/dev/modules/generated/sklearn.ensemble.RandomForestClassifier.html#sklearn.ensemble.RandomForestClassifier) version 0.22).

**Random feature selection**

Random feature selection for each node split when constructing individual decision trees is another source of randomness in Random Forest algorithm. There are two options to select all features for random sampling or select from a predefined number of features. For example, by default scikit-learn uses all features for regression and the square root of the number of features for classification problems.  This is the part of the parameter tuning process, and along with 'max_features', we can also study the effects of adjusting other [parameters](https://scikit-learn.org/dev/modules/ensemble.html#random-forest-parameters) like 'max_depth' and 'min_samples_split'.

After we selected random features, we can use the same criteria for selecting the best splitting features, like [Gini impurity](https://dev.to/xsabzal/gini-splitting-criterion-475f) (classification problem) or [reduction in variance](https://dev.to/xsabzal/decision-trees-splitting-592o) (regression problem). 

**Constructing multiple decision trees**

Finally, we construct decision trees for each bootstrap sample and using a random feature selection process. 

**How Random Forest makes the final decision**

As we can see Random Forest uses a few random methods to create multiple decision trees. In the end, each decision tree will have the same vote ('weight') in a final decision in the case of the classification problem, or the mean value of all trees' results is calculated for the regression problem.
[Video] Apollo And GraphQL with Vue3 Apollo Composables in Ionic Framework
Tags: ionic, graphql, vue, javascript
Published: 2020-11-23 04:24:13

{% youtube FNL2ZS4iR5E %}

In this project and video, we are assuming you understand the basics of GraphQL but are interested in how to use the [Vue Composition API with GraphQL](https://v4.apollo.vuejs.org/guide-composable) in VueJS and of course [Ionic Framework](https://ionicframework.com/blog/announcing-ionic-vue/)

> Source Code: https://github.com/aaronksaunders/ionic-vue3-graphql

For our local GraphQL Server we are using this great tool `json-graphql-server`, see link below for more information.

This is how you start the JSON GraphQL Server, there is default data included to get you started
```
json-graphql-server db.js
```

### Related Links
- Vue Composition API: https://github.com/vuejs/composition-api
- json-graphql-server: https://github.com/marmelab/json-graphql-server
- @vue/apollo-composable: https://v4.apollo.vuejs.org/guide-composable

### More VueJS & Ionic Videos
[![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/xw2w8i9ccngje6h77m8s.png)](https://www.youtube.com/channel/UCMCcqbJpyL3LAv3PJeYz2bg)
Build A Flutter 💙 Tinder Clone with Firebase & BLoC #17/41 Profile Widgets
Tags: flutter, tutorial, dart, career
Published: 2020-11-23 04:19:44

---
title: Build A Flutter 💙 Tinder Clone with Firebase & BLoC #17/41 Profile Widgets
published: true
description: Tutorial on building a Tinder clone with Flutter, Firebase and Bloc
tags: #Flutter #Tutorial #dart #career
//cover_image: https://direct_url_to_image.jpg
---

In this series of videos we are going to build a Tinder clone using Flutter, Firebase as a backend and Bloc as our state management solution.

Here we set up the widgets used on the profile page.

Protip: Watch video at 1.25 speed.


{% youtube VA-B1WkOZ0w %}
Learn GCP
Tags: googlecloud
Published: 2020-11-23 03:45:10

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

I released my annual update to my course ['Google Cloud Platform Essentials'](https://www.linkedin.com/learning/google-cloud-platform-essential-training-4) recently.  This is my FOURTH revision and includes updates for GCP services in 2020 - the course is designed for devs NEW to GCP.

As with all of my courses on LinkedIn Learning, I created (and continually update) a companion GitHub Repo, with code samples, sample data and links to learn more.  My ['gcp-essentials'](https://github.com/lynnlangit/gcp-essentials) Repo contains bonus material as well.

Additionally, I have created an open source version of this course for the BIOINFORMATICS vertical.  This course, ['GCP-for-Bioinformatics'](https://github.com/lynnlangit/gcp-for-bioinformatics) is also on GitHub and includes notes, code samples, sample data and linked screencasts.
Interview JS Part 1 - Call Stack (Inspired by Colt Steele)
Tags: javascript, computerscience
Published: 2020-11-23 03:24:09

### **Why should we care?**

* It's fundamental to how JS works

* It's helpful for debugging, almost all browsers come with debugging tools which help us see what all is happening at any time with the call stack.


### **What is a Call Stack?**

We can consider it as a to-do list. A ** to-do list** of function invocations. A function may have cascading function calls taking place. But mainly JavaScript is a single-threaded language, we will ignore the thread pooling effect taking place so JS can do a single task in a single unit of time. 

So it has to keep track of the history of what all executions are to be made and what all things will be returned. **Mainly which functions are invoked and which are waiting to get invoked.**

### **To-Do List**

**Last In, First Out**

```javascript
/*Call Stack*/
/*
--------------
| something  |
--------------
|   multiply |
--------------
|     main   |
--------------
*/
function main() {
     multiply()
}

function multiply() {
      something()
}

function something() {
      console.log("Hello")
}

main()
```

* Whenever you invoke a function, the details of the invocation are saved to the top of the stack( pushed to the top )

* Whenever a function returns, the information about the invocation is taken off the top of the stack (popped off the top)

### **Stack Frame Contents**

* The function that was invoked 
* The parameters that were passed to the function
* Current line number

If one function calls another and that function calls the same function they will get into the error of Maximum Stack Size exceeded. You can see this in the debugger tools of any browser.
Google Sheets Everything
Tags: management, productivity, workflow
Published: 2020-11-23 03:21:32

I think Google Sheets is incredible, and I use it for a lot of things. I made a video with some real examples of why I think it is useful.

https://www.youtube.com/watch?v=pT0ygLoSd8E
{% youtube pT0ygLoSd8E%}

I hope I inspire some of you (especially being coders!) to give it a go, if you aren't using it already 👋
Code Smell 32 - Singletons
Tags: codenewbie, tutorial, webdev, programming
Published: 2020-11-23 03:19:39

*The most used and (in)famous design pattern in the world is causing us great harm.*

# Problems

- Coupling

- Testability

- Accidental implementation problems.

- Multi threading issues.

- Static methods polluting.

- Object creation contract violation.

- [Bijection](https://dev.to/mcsee/the-one-and-only-software-design-principle-3086) mismatch.

- Memory issues.

- Premature Optimization.

{% post https://dev.to/mcsee/code-smell-20-premature-optimization-4moe %}

# Solutions

1. Avoid it.

2. Use contextual unique objects.

3. Benchmark object creation.

# Examples

- Database Access

- Globals

- Loggers

- Helpers

{% post https://dev.to/mcsee/code-smell-22-helpers-2j6j %}

# Sample Code

## Wrong

{% gist https://gist.github.com/mcsee/5f0b4685e3af22e2a0a82f9f642c5c79 %}

God is the archetypical singleton example.

{% gist https://gist.github.com/mcsee/df78952fd4871362eaffcc6ce7ab6c94 %}

{% gist https://gist.github.com/mcsee/e9a082aca6e2e7e4412d5da4290a5f0a %}

## Right

{% gist https://gist.github.com/mcsee/48af2ebb8874c53f5aa5091c24c832e5 %}

# Detection

This is a design pattern. We should avoid it by policy. 

We can add linter rules for patterns like *'getInstance()'* so new developers cannot infect code with this [anti-pattern](https://en.wikipedia.org/wiki/Singleton_pattern).
 
# Tags

- Globals

# Conclusion

This is an historical mistake already acknowledged by the community. Nevertheless, lazy developers bring it again and again. We need to reach a consensus on its drawbacks.

# Relations

{% post https://dev.to/mcsee/code-smell-06-too-clever-programmer-37lb %}

{% post https://dev.to/mcsee/code-smell-25-pattern-abusers-2dgi %}

{% post https://dev.to/mcsee/code-smell-18-static-functions-fpj %}

# More info

{% post https://dev.to/mcsee/singleton-the-root-of-all-evil-50bh %}

# Credits

Photo by <a href="https://unsplash.com/@miteneva">Maria Teneva</a> on <a href="https://unsplash.com/s/photos/rotten">Unsplash</a> 

* * *

> The Diagram is Not the Model. The model is not the diagram. It is an abstraction, a set of concepts and relationships between them.

_Eric Evans_
Why did I decide to study Software Engineering?
Tags: beginners, flatiron
Published: 2020-11-23 02:24:51

:001 > puts "Hello World!"
**Hello World!**
 => nil

I recently joined Flatiron School in their Software Engineering program.  The first two weeks of the course are called the First Mile.  As part of that I was tasked with writing a blog post to answer the question above.

As I think back to where my journey with coding first started, I go back to Christmas of 1984.  I was almost 6 years old and my family got a Vic20 as a present.

I remember being excited to have such a cool and wonderful piece of technology available to me.  I remember opening the manual and finding instructions on writing small programs in BASIC.  I would work slowing typing those instructions into the interface.  Often I would have something off in my syntax and have to re-type everything and hope I got it right.  If I did I was rewarded with a sound or some colors and it was an exciting feeling for a six year old.

Since then I have been interested in technology in many different ways.  I never got much deeper into coding but I was into computers and the internet and everything tech related.

Over the years I tried to get into coding with various levels of success.  Coding always seemed to me like magical powers and the people who could use it like wizards.  It was mysterious and the wizards had their own language to keep away outsiders.  I wanted that power but never really had the time while working and having a wife and kids.

It finally got to the point where I was offered an opportunity by some family to really throw myself into it.  I decided it was time.  

These past two weeks have been a roller coaster.  I felt confident in the first week and felt like I was understanding what was presented.  In the second week there were some hard days where I was asking myself "WHY did I decide to study software engineering?"

The breakthroughs and successes have carried me through.  I still know there is so much to learn and I know it will be complex and hard at times.  I feel like with the support of my family and my online classmates that I can do this.

Thanks for reading.
Announcing Word Wrap Podcast
Tags: news, webdev, podcast
Published: 2020-11-23 02:12:20

I'm pleased to announce the [Word Wrap podcast](https://wordwrap.dev), co-hosted by myself ([Stephanie Eckles](https://twitter.com/5t3ph)) and [Claire Lipskey](https://twitter.com/tackjhompson).

Word Wrap is about opening up our discussions to a wider audience on all sorts of topics related to what it means to be developer in the 21st century.

We've each been developers for over a decade and watched the web evolve while we - like many of you - tried to keep up. Our past involves working together at an in-house marketing agency, after which our paths diverged to areas such as insurance and financial tech, design systems leadership, front-end focused software engineering, and accessibility. We have experience across the front-end spectrum, inclusive of HTML, CSS, JS, and the surrounding ecosystem of frameworks and systems. You can get to know us more on [our About Us page](https://wordwrap.dev/about/).

What you can expect by subscribing to Word Wrap:
- a bit of quirk and cheese
- a whole lot of nerdy developer talk
- respectful discussion of hot-button topics
- friendly banter that invites your opinion and feedback

Our topic mix will include:
- all things front-end (HTML, CSS, JS, accessibility)
- growing your career
- teams, workplaces, and processes
- learning new tech
- diversity
- mentoring
- being womxn in tech/on the web
- ...perhaps the occasional (small) rant

**Our first two episodes are available** - here are the links for listening and transcripts:
- [Episode 001](https://wordwrap.dev/episodes/001/) - Claire and Steph introduce themselves in this podcast. We get to hear their journeys into development, and their general tips for how in the world to navigate the development career path.
- [Episode 002](https://wordwrap.dev/episodes/002/) - Claire and Steph talk about their experience with CSS - why it matters, what flavors they've seen, and why that experience matters. Tailwind, CSS-in-JS, even Bootstrap gets a mention!

> Please [subscribe on your preferred platform](https://wordwrap.dev), or pick up [the RSS feed](https://wordwrap.dev/feed/), and follow [@wordwrapshow](https://twitter.com/wordwrapshow) on Twitter. Thanks for your support!
functions/lib/index.js does not exist, can't deploy Cloud Functions
Tags: typescript, firstpost, npm
Published: 2020-11-23 02:12:19

Im attempting to deploy my firebase functions but am stuck with this strange error. 

In addition, I am missing the lib folder, have not found a way to read it. (I noticed that it had been deleted after I restarted the project by deleting relevant files and folders and running firebase init)

Error: 

Running command: npm --prefix "$RESOURCE_DIR" run lint

> functions@ lint /Users/name/Desktop/Yoveo/functions
> eslint "src/**/*"

Running command: npm --prefix "$RESOURCE_DIR" run build
✔  functions: Finished running predeploy script.

Error: There was an error reading functions/package.json:
 functions/lib/index.js does not exist, can't deploy Cloud Functions

NOTE: My lib folder is missing.
Generate unique (non-repeating) random numbers
Tags: random, unique, numbers, javascript
Published: 2020-11-23 02:10:03

**Backstory:** when I was doing one of my side projects, one of the tasks was to display photos from Unspash API in multiple cards. Goal was to pick photos randomly without repeating them. I used good old `Math.random()` to randomly pick photos from API's response. But the problem was that often few numbers were repeating, thus there were the same pictures in different cards.

Let's say you want to generate 5 random unique numbers from 1 to 10. Big chances that you'll get at least one repeated number.

*Solution for this task is to replace each picked (random) number in array with another unused one.*

In the code this would be something like this:
```
function randomUniqueNum(range, outputCount) {
 
  let arr = []
  for (let i = 1; i <= range; i++) {
    arr.push(i)
  }
  
  let result = [];

  for (let i = 1; i <= outputCount; i++) {
    const random = Math.floor(Math.random() * (range - i));
    result.push(arr[random]);
    arr[random] = arr[range - i];
  }

  return result;
}
```

Let's look line by line.
Function takes range, and output count.
For instance `randomUniqueNum(10, 5)`
First we generate array from 1 to 10
```
 let arr = []
  for (let i = 1; i <= 10; i++) {
    arr.push(i)
  }
```
`arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]`

Then we use another loop to pick numbers from this array.
Iterations in this loop equals to output count, in this case to 5.
Then we generate random number:
```
const random = Math.floor(Math.random() * (range - i))
```
Each iteration we decreasing range by 1.
Then using this random number as index in `arr` we push it to the result array:
```
result.push(arr[random])
```

After that we replace 'used' number in `arr` with the one from the end of the same array:
```
arr[random] = arr[range - i]
```
Even though in the next iteration `Math.random()` will give us the same number, we'll get different result because we replaced it with the number from the end.

Since we decrease range in each iteration: `range - i` so numbers from upper end of array will not be picked.
At the end we just return array of unique random numbers.

I hope this would help you in any way.
Ternary Operators Syntax Comparison - C++ vs Python vs JavaScript
Tags: cpp, javascript, python
Published: 2020-11-23 01:49:05

Ternary Operators also known as conditional expressions are an elegant and succinct method to replace if-else statement in programming. These operators evaluate something based on a condition being true or not. 

In this post, We'll see the different syntax in which ternary operators in implemented in C++, Python and JavaScript.

Consider the following code snippet, 

```python
num = int(input('Enter a number please: '))
if num % 2 == 0: 
	print('num is even')
elif: 
	print('num is odd')
```

This code checks if the inputted number is even or odd.

With ternary operator, we can reduce the above if else statements with a one-liner code.

In Python,

```python
# syntax
# [on_true] if [expression] else [on_false]

num = int(input('Enter a number please: '))
print('num is even') if num % 2 == 0 else print('num is odd')
```

In C++

```cpp
// syntax
// expression ? [on_true] : [on_false]

int num;
cout << "Please Enter a number: " << endl;
cin >> num;
num % 2 == 0 ? cout << "Num is even" : cout << "num is odd";

```

In JavaScript

```jsx
// same syntax as C++
// expression ? [on_true] : [on_false]

let num = prompt('Please Enter a number: ')
num % 2 == 0 ? alert('num is even') : alert('num is odd')
```

Thus, if the expression to be evaluated is small, then ternary operators can prove to be a viable one-liner alternative.