teleren/devto huggingface dataset:
The Only Way Out is Through!
Tags: devjournal, career, codenewbie, womenintech
Published: 2021-03-29 07:15:34

_This post was originally published on March 29, 2021 on [my blog] (https://alexlsalt.github.io/blog)._

-------------

Happy Monday! I'm looking forward to starting this week off on a fresh, clean slate.

I feel like last week I wasn't at my best, and it stemmed a bit from having trouble with my local development environment acting up and not working as well or as seamlessly as usual.

I made the mistake of getting down on myself about that and made it mean something negative about me and my skills as a developer. Thankfully, after talking to some of my teammates, I came to the realization that all developers of all levels face finicky problems with their environments at different points throughout their careers.

Just hearing that made me realize that it wasn't just me doing something wrong. So helpful and validating.

Another thing on my mind is that this journey is supposed to feel really hard and uncomfortable at times - especially in moments of true learning and growth. If you're not feeling at least a little uncomfortable (and let me tell ya, I'm feeling it!) then you're not giving yourself as much of an opportunity for growth.

So I'm reframing everything from this moment. The only way out is through, and I'm here for all of it.

-------------

Pssst! I send weekly newsletters about the self-taught coding journey and my own coding adventures (and misadventures!)  [Sign up here! >>](https://ladies-code-collective.ck.page/e53b5fca44)
Cognitive Radios
Published: 2021-03-29 07:14:44

As a growing trend of my writing series, I present you with another rendition of well the wireless technologies in the domain of Cognitive radio networks. 

# What the hell is this?

A cognitive radio :
It is a Dynamically changing radio that in theory can access the best available wireless channels and avoid interference and congestion of traffic. How it does that is a little more challenging but Relying on the principles of Dynamic Spectrum Management (a set of techniques that employs AI, ML and cross-layer optimization: It relies on the idea when primary entities are absent a licensed spectrum is made available to unlicensed users ) somewhat similar to a cognitive process that happens inside our brain. 


Well, the reason these cognitive radios exist is simple. To use the underutilized spectrums in the communication of messages. Inside a traditional radio network, there are fixed bands that each radio is a constraint too. This fixation of bands has to lead to the sub-par performance in the much wider domains of contestation for bands and the congestion of spectrums and most of the networks are then unable to work intelligently. i.e they only do/look after a problem that has occurred rather than working to avoid the occurrence first  As the world has progressed further, we have been trying to optimize these wavebands reasons can be attributed to the increased connection points for communication I mean as compared to the previous years [insert facts] there has been an increase in devices. Thus, regular radio has started showing its age. 



# What is a network?
A computer network is a group of computers that use a set of common communication protocols over digital interconnections for the purpose of sharing resources located on or provided by the network nodes.


# Is it the future?
Well, the answer is pretty complicated. Security is one big issue that remains the deciding factor in choosing a cognitive radio over a traditional one. There could be a situation where a licensed spectrum is in use by a non-licensed user thus undermining the integrity of the network. Moreover, it assumes that the techniques are scalable across multiple spectra which is not true each spectrum is unique in some regards 

As this study points out 
For instance, television is a broadcast system with passive receivers, while cellular networks typically include bi-directional asymmetric1 transmissions. Such very different types of primary services create very different kinds of spectrum holes as well, which require different treatment.

Pelechrinis, Konstantinos & Krishnamurthy, Prashant & Weiss, Martin & Znati, Taieb. (2012). Cognitive Radio Networks: Realistic or Not?. arXiv preprint arXiv:1209.2154. 43. 10.1145/2479957.2479965.
Which do you prefer, and why?
Tags: csharp, dotnet, discuss
Published: 2021-03-29 07:09:02


Yes, I'm here again with a c# coding style question - and today - between the following different coding styles - which do you prefer and why?

1:
```csharp
if(condition) single-line-of-code;
```
2:
```csharp
if(condition) 
    single-line-of-code;
```
3:
```csharp
if(condition) 
{
    single-line-of-code;
}
```
4:
```csharp
if(condition) 
    {single-line-of-code;}
```
5:
```csharp
if(condition) {single-line-of-code;}
```
Pomodoro and ToDo...
Published: 2021-03-29 06:59:19

On day 7 & 8 of #100DaysOfCode, I made a Pomodoro app and a todo list app both using JavaScript, this can be used to manage both time as well as maintain discipline among the user, from which he/she can track their works by adding tasks in the ToDo and can manage their work by using a Pomodoro technique, 
So What is a Pomodoro technique?
---> Pomodoro Technique is the time management technique which is used by many students who are in their teens, in order to manage their work, 
A Pomodoro, is a 25:5 minutes techniques,
Eg.. Lets take an example, let's say you are a developer in Google  or at any of your dream job destination. You are assigned a task, you don't know how to manage your time, because you get distracted very easily, so how  we can overcome this is by using this technique, by concentrating 25 minutes only on assigned task, and after 25 mins, take 5 min rest, continue this cycle for around four times, also keep track by adding todo, and make commitment to yourself, that you'll be completing the listed toDo's in this 25 minutes with no distractions.

For checking out the project I made, here's the link,
----> https://ashuydv.github.io/javascript-7/
----> GitHub(For code): https://github.com/ashuydv/javascript-7 
----> Follow me on Twitter: https://twitter.com/ashu_ydv18
The history of JavaScript in 13 minutes (video)
Tags: javascript, 100daysofcode
Published: 2021-03-29 06:52:52


I put together this video that covers the history of JavaScript. We start from the invention of the web and then cover the early JavaScript years at Netscape/Microsoft, followed by standardization and the various ECMAScript editions. 

{% youtube 9gNCWUEvLAI %}


#javascript
PostgreSQL MATERIALIZED VIEW non-blocking, yet updated frequently
Tags: sql, postgres, database, help
Published: 2021-03-29 06:51:03

- It needs to be REFRESH'd after update.
- REFRESHing **locks** VIEW's read, and may subsequently make server and UI unresponsive.
- REFRESH MATERIALIZED VIEW **CONCURRENTLY** makes it non-read blocking; however
  - Sending multiple repeated REFRESH's **still blocks reading**
  - MUST be fixed with throttling
  - Also, CONCURRENTLY needs UNIQUE INDEX on MATERIALIZED VIEW

## The solution??? - _throttling_

```typescript
import sql from '@databases/sql'

const isPending: Record<string, Promise<any[]> | undefined> = {}

export async function refresh(view: string) {
  if (!isPending[view]) {
    isPending[view] = new Promise((resolve, reject) => {
      db.query(
        sql`REFRESH MATERIALIZED VIEW CONCURRENTLY ${sql.__dangerous__rawValue(
          view
        )}`
      )
        .then(resolve)
        .catch(reject)
    })
  }
  await isPending[view]
}
```

_I suspect that my answer is still wrong. I should debounce, rather than throttle; to ensure eventual update._

My materialized views can take around 30 seconds to refresh; because of so many entries, with PL/pgSQL functions and indexing.

## So, I am new to PostgreSQL

But, I made quite a full project, with plugins, PL/pgSQL and stuff, as seen in this project - <https://github.com/zhquiz/zhquiz/tree/master/packages/www/db/initdb.d>

{% github zhquiz/zhquiz no-readme %}

Please advise me anything you can help, including [where to host?](https://dev.to/patarapolw/what-can-i-host-postgresql-with-custom-extensions-for-cheap-or-free-4gn4)
ACT Light Not Working On Raspberry Pi, Fixed!
Tags: raspberrypi, iot, circuits
Published: 2021-03-29 06:49:40

I had bought a Raspberry Pi for a hobby of mine, and they are not exactly cheap. A couple of months after the Raspberry I got it, it would simply not boot up. The ACT light would not turn on. 

Here's how I fixed it.

__Install the RaspberryPi Imager:__

1. Go to [this link](https://www.raspberrypi.org/software/) and download the required software.
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/39sevzi8qmtkeijejrwf.png)

2. Open the imager.

3. You will see a screen like the picture given below

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z4b90w6p37j590yha95a.png)

4. Go to Choose OS -> Misc Utility images -> Bootloader -> SD Card.

5. Upload the software to an empty SD card.

6. Insert it into the RaspberryPi and then wait. It is important that it is connected to a monitor at this stage.

7. After around 5 minutes, a green screen will appear. Turn the Pi off and then insert a SD card with the desired OS into the PI.

8. Wait for a few minutes and the Raspberry Pi will boot up.


Happy coding!

Follow me on:
[Linkedin](https://www.linkedin.com/in/pranav-viswanathan-7976711b7/)
[Github](https://github.com/PranavViswanathan)
Day 15 of 100 Days of Swift UI
Published: 2021-03-29 06:41:49

I just completed day 15 of 100 days of SwiftUi. Today I reviewed what I learnt properties, static properties and methods, closures, polymorphism.

I start learning SwiftUI tomorrow so I'm pretty excited. 

If you are interested in taking the challenge, you can find it at https://www.hackingwithswift.com/100/swiftui
See you tomorrow ;)
I made 22 Free Icons
Tags: opensource, webdev, showdev, discuss
Published: 2021-03-29 06:23:05

Hi Everybody,
do you want to use free business icons in your next project. Take a look at my first released free icon pack: [22 Free Business Chart Icons](https://www.iconfinder.com/iconsets/business-charts-free-pack).
You can download the icons in **PNG** format (in common sizes), as **SVG**, **ICO** or **ICNS** without registration.

What is your opinion about the icons? Do you have any suggestions for changes?

---

**If you are also interested in paid icons follow this link to [get a 50% discount](https://www.iconfinder.com?ref=lucianojung)**

###Here you see some of these icons:

<table style="width:100%">
  <tr>
    <td><img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jlwiskl4oa8vewe66q6x.png"> </td>
    <td><img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zcg5hmm1h4mj17uzkf14.png"> </td>
    <td><img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/socvb2u0klrmcu84fj16.png"></td>
  </tr>
</table>
My Final Project For Ruby at Flatiron
Published: 2021-03-29 06:08:17

For my very first project at flatiron I needed to create a gem that uses an API to get data and return the data(I used an API that shows information on different breweries) and give the user options to create a username, login, see the all the breweries, go a level deeper and see all the information about the breweries, add a note to whichever breweries they wanted to and log out. This project at first was really difficult. I had no idea where to start or what to do! But once I started rediscovering all the things I could do, I finally started getting a flow down ☻. This really tested a lot of my knowledge about ruby and especially object oriented coding. It's one thing to pass tests on labs but to actually have a full plan on how you're going to create something yourself is a whole different task. I wish I had even more time to add some more things for the user to do. All in all, it was a lot of fun and I'm very proud of what I created. I'm excited to see what's in store for us to learn at flatiron.
Gamification examples in education websites

Tags: gamification, websites, education, app
Published: 2021-03-29 06:03:54

I've been interested in gamification for several years. I wanted to share my experience and get feedback. Benefits of gamification for your app or website.

Gamification in education serves several purposes when it comes to educating students or educating employees.

**School education**:

*Create engagement and motivation to learn.
*Make the process interactive and fun.
*Improve your learning skills, as well as the acquisition and retention of knowledge.
*Learn how the real world works – there are rules, and every decision has consequences.
*Encourage healthy competition and self-improvement.
*Teach psychological practices, such as how to be resilient to failure.
*Increase your creativity.
*Learn to work in a team and collaborate.
*Reduce stress. 

Do you agree with me? Do you think gamification is important in education?
Typescript - Tips & Tricks - Mapped Types
Tags: typescript, webdev
Published: 2021-03-29 06:03:18

In some cases, we need to manipulate some types to create new types. In these cases, we have to use the Mapped Types.
Let's start explaining the structure of the mapped types.
```ts
type MappedTypeExample = {
    [Key in "x" | "y" | "z"]: number;
};
```
As you can see, a mapped type is a type composed of defined keys and their values, but the power of the mapped types goes out when we want to joke with a generic type.
```ts
type Point = {
    readonly x: number;
    y: number;
    z?: number;
};

type MappedType<T> = {
    [K in keyof T]: T[K];
};

type mappedPoint = MappedType<Point>;
/**
 type mappedPoint = {
    readonly x: number;
    y: number;
    z?: number | undefined;
}
*/
```
In this simple example, I show you how to replicate the same object using the mapped type.
Now let's add two simple bits to transform our type into new "different" types. The mapped type permits you to add(+) or remove(-) the read-only modifier from your type but also to add(+) or remove(-) the optional modifier.
I leave you two simple examples to show these cases.
```ts
type MappedPointPlusModifier<T> = {
    +readonly [K in keyof T]: T[K];
};

type mappedPointPlusModifier = MappedPointPlusModifier<Point>;
/**
type mappedPointPlusModifier = {
    readonly x: number;
    readonly y: number;
    readonly z?: number | undefined;
}
*/

type MappedPointMinusModifier<T> = {
    [K in keyof T]-?: T[K];
};
type mappedPointMinusModifier = MappedPointMinusModifier<Point>;
/**
type mappedPointMinusModifier = {
    readonly x: number;
    y: number;
    z: number;
}
*/
```
_N.B. The add(+) modifier isn't indicated in common cases because it is implied_

The mapped types are a powerful feature to manipulate our types and they are used by the typescript team to expose to us some advanced types, but this is a topic of a future post.
Before ending I leave you another example to show what you can do with the mapped type.
In this example, I transform the Point type to another Point type where the fields aren't exposed directly but they are wrapped by a "get" and "set" method.
```ts
type Getters<T> = {
  [K in keyof T as `get${Capitalize<string & K>}`]: () => T[K];
};
type Setters<T> = {
  [K in keyof T as `set${Capitalize<string & K>}`]: (value: T[K]) => void;
};
type WithGetterAndSetter<T> = Getters<T> & Setters<T>;

type Point = {
  x: number;
  y: number;
};

type WithGetterAndSetterPoint = WithGetterAndSetter<Point>;
/**
type WithGetterAndSetterPoint = {
  getX(): number;
  setX(value: number): void;
  getY(): number;
  setY(value: number): void;
}
*/
```

It's all for today!
See you soon guy!
Not noticing new objects
Tags: ruby, rails, beginners, tips
Published: 2021-03-29 05:39:12

Not noticing new objects or resources other than those that already exist in the domain is a common mistake. Because of it, we start to spread the entire behavior of an application across three or four models — God classes.

Let's say we have a blog service where administrators approve posts. Usually we tend to add approve and disapprove actions to the `PostsController`:

```
PATCH /posts/1/approve
DELETE /posts/2/disapprove
```

`PostsController` becomes huge and unmanageable. A "refactor the PostsController" task is added to the tracker.

But if you look closely and ask yourself "should the `PostsController` receive approve or disapprove? If not, then who?", you may notice a new object and resource `Approval`:

```
POST /posts/1/approval
DELETE /posts/2/approval
```

`PostsController` remains the same, `ApprovalContoller` turns out to be small and focused on a single task. 

**tl;dr** Don't try to fit everything into existing objects: models, controllers. Look for new objects and resources
SPVM Document is upgraded. SPVM is a Programming launguage which has Perl-like syntax
Tags: perl, spvm
Published: 2021-03-29 05:20:52

SPVM Document is upgraded.

Add simple example to top.

<a href="https://yuki-kimoto.github.io/spvmdoc-public/">SPVM Document</a>

If you know where the new programming language will be announced, can you tell me?

I don't know where to make a good announcement.

Do I need a lot of money and power to get to know in 2021?

Does the Dev community have the opportunity to unveil great products that aren't yet known?
Undefined vs. Null vs. Undeclared 
Tags: javascript, programming
Published: 2021-03-29 05:13:57

A typical JavaScript interview question asks "What is the difference between a variable that is: null, undefined and undeclared?"

Lets break each one down and understand what each one means and how it relates to programming.

#Null:
*"The value null represents the intentional absence of any object value. It is one of JavaScript's primitive values and is treated as falsy for boolean operations."* (MDN Web Docs, Online). Null means that the value is absent, not 0... the value points to no object.

    x = null;

#Undefined:
*"The undefined property indicates that a variable has not been assigned a value, or not declared at all."*, (W3Schools, Online). 

    let x
    console.log(x + "test")
    // x is undefined

#Undeclared:
Variables that have been declared without using const, var, or let. For Example:
   
    testVar = "This is undeclared"
    // as opposed to
    let testVar = "This is declared"


Now lets discuss the differences between all three. Null is pointing to nothing in memory. Undefined is a variable that has not been assigned any value. Lastly, undeclared is a variable that has not been properly declared using const, var, or let.
Find your global IP address using python
Tags: python, ip, programming
Published: 2021-03-29 04:53:20

In this post i will show you how to find your global ip address using python , So why wait let the hacking begin !

First see the code:- 
```python
import bs4,requests

def ipadd(url):
    res = requests.get(url)
    res.raise_for_status()
    soup = bs4.BeautifulSoup(res.text,"html.parser")
    elems = soup.select("body > main:nth-child(1) > div:nth-child(1) > h1:nth-child(1)")
    return elems[0].text.strip()

ipis = ipadd("https://ipecho.net/")
print("Your global ip is "+ipis)
```
Nothing difficult i am going to breakdown the code
first we are importing two modules bs4 aka beautifulsoup and requests
bs4 used for web scrapping .
1. we are requesting to a url named 'ipecho.net' 
2. checking if any error has been raised or not
3. scraping the request using bs4
4. selecting that html part which has the info we need
5. returning the ip in text or string format
 
It is simple  isn't it :)
Baker to Coder
Published: 2021-03-29 04:52:00

I've been a baker for more then 6 years. I enjoyed my job, everyday we got to just make and bake bread. It was my first job coming out of high school. At first it was a job, money in my pocket and it was like that for a while. It wasn't until I got hired at my last bakery where things changed. I met people who were very passionate about their jobs. To them it was an art and they wanted to perfect it. I never thought about it like that. 

That mentally flicked a switch in my head. I started to wonder how it all worked. From the sourdough to yeast, I started to ask why we did it in a certain order and why not another. Everyone was happy to teach me and it was great but something else clicked. As much as i enjoyed this, I wasn't as passionate as my coworkers. That made me start looking else where. I wanted that drive, that hunger for answer. That's when I started getting into coding and IT. 

Why did I go into software development? I'm always learning and trying new things. It's because I can create things. While baking I learned something important about myself, I want to create things and I want to understand how it works. This is just a start but I've never been happier learning all of this.
How to unbond your FIS on StaFI
Published: 2021-03-29 04:41:35

Unbond means refund part of FIS you delegated to nominators. This process will take you approximately 14 days/ two weeks.
this guide shows you how to unbond your FIS.


1. To unbond, click Unbond funds.

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

2.Confirm the Stash account you want to unbond and the corresponding Controller account, then fill in the amount of FIS , then click unbond

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

3.The transaction is initiated through Controller account. Confirm the account and fill in password, then click sign and submit

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

4.When you initiate Unbond, you have to wait for 14 days to get FIS back,  please be noted!

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3ymyst63kuzvbb0wyiab.png)