teleren/devto huggingface dataset:
Truthy, true, Falsy, false... What on earth am I getting into?!
Tags: beginners, programming
Published: 2021-11-10 13:38:37

If you're studying programming or working with this vast and sometimes complicated area, you may or may not have come across the terms truthy or falsy. But what do they mean? Aren't they supposed to be the same as the boolean values true and false?

In a short and straight answer, truthy and falsy are concepts that aim to evaluate different types of data (strings, numbers, etc.) into boolean values. This evaluation will occur in your code's expressions and conditional operations (if, else if, etc.). The rules may work differently depending on which programming language you're using, but in general, they are:

**Falsy**:
* Strings: Empty strings.
 * Ex: const empty = "";
* Numbers: The value is zero.
 * Ex: const number = 0;
* Null pointers: The assigned value is null or undefined.
 * Ex: const nullValue = null;
 * Ex: const undefinedValue = undefined;

**Truthy**:
* Strings: Strings filled with any value.
 * Ex: const word = "Truthy";
* Numbers: Any number different than zero.
 * Ex: const positive = 10;
 * Ex: const negative = -1;
* Objects: Any object.
 * Ex: const noData = {};
 * Ex: const data = { word: "Word" }
* Arrays: Any array.
 * Ex: const emptyArray = [];
 * Ex: const array = [1, 2, 3];

As for variables and constants, the rule works according to the type of the assigned value.

Keep in mind that I used Javascript in my truthy/falsy examples, so it may vary if you're using a different language. I do encourage you to go ahead and try out what does and does not work in your language!
Dynamic Navigation - How to Render Nav-Items Dynamically in a Next App
Published: 2021-11-10 13:31:07

I came by this article by Caleb Olojo which I found quite useful. 

If you have a scenario where you need to render navigation links dynamically, you need to go through this link. 

He did a really great job explaining his process. 

Happy hacking and thanks again Caleb. 

Link: 
https://www.freecodecamp.org/news/dynamic-navigation-in-nextjs/
https://www.freecodecamp.org/news/author/calebolojo/
Now on dev.to!
Tags: meta
Published: 2021-11-10 13:18:52

---
title: Now on dev.to!
published: true
tags: Meta
canonical_url: https://aas.sh/blog/now-on-devto/
cover_image: https://res.cloudinary.com/aas-sh/image/upload/v1636548957/blog/2021/11/2021-11-10T12_h6t8ib.png

---
Hey everyone! So this is my first 'meta' post which indicates that this blog post is related to my blog itself!

I can't believe I hadn't heard of it before, but [dev.to](https://dev.to) is an incredible place filled with rich content written by developers just like myself! I've been reading and learning a few new things there the past few days, and figured that it's time to join them. You can find my profile at [dev.to/ashe](https://dev.to/ashe).

[I've set up my RSS feed](https://aas.sh/index.xml) not only so that RSS readers have access to my content, but also so that I can pull my posts from my site onto [dev.to](https://dev.to). This means that I have a good starting point when it comes to formatting my posts and preparing them for cross-posting. The workflow is really nice, and although it could be better if I managed to get the [GitHub action 'publish to dev.to'](https://github.com/marketplace/actions/publish-to-dev-to) working, I don't write a lot and having an opportunity to manually adjust content before posting feels good to me.

I'm hoping that cross-posting my content both introduces people to who I am and what I do and what I'm about, while also giving me a chance to produce more/better content as my blogging career continues. Even though I am talking about [dev.to](https://dev.to), my priority is and always will be my private space of the internet, [aas.sh](https://aas.sh). Posts will always be written here (or there, depending on where you're reading this!) first, and then I'll cross-post shortly after. 

I will say that I have some hand-crafted things for my website, such as captions and galleries, and so readers on [dev.to](https://dev.to) may not be able to experience the same things. That said, if you're on [dev.to](https://dev.to) then you'll be accustomed and potentially even fond of the consistent and streamlined styling across all content on the site, so I'm sure this isn't a problem.

And that's about it for today's post --- I don't want to drag this out to be longer than necessary! Like I said in [my last post](https://aas.sh/blog/4-months-at-jagex), expect to see some new posts coming soon related to **[Outer Wilds](https://store.steampowered.com/app/753640/Outer_Wilds/)** and **[NixOS](https://nixos.org/)**, as well as (hopefully) **a brand new page on the website that's like a roadmap of my life**.

And if you're reading this from [dev.to](https://dev.to), welcome!
Generating display and sizing utilities with SASS
Tags: css, scss, webdev
Published: 2021-11-10 13:01:33

### Greetings 

Here we are again , this time I tried to add more utils to my previous mini utility library .

## display and sizing utilities with SASS

I need to generate display properties for my utils classes so here I am .

```sass
$displayProps: ("block", "inline-block", "inline", "flex", "grid","inline-flex", "inline-grid", "table", "inline-table","list-item", "none", "contents");
```
I can add more display properties but that's ok for me just now as usual I store the displayProps obj in my [_variables.scss](https://dev.to/riley1101/on-my-way-to-generate-css-utils-with-sass--ghn) just so I can start generating.

Make sure you checkout all the previous articles just so you can see how I ended up here !.

Got a object to work with so it's time to generate utility classes with it .

So I started typing in my [_utilities.scss](https://dev.to/riley1101/on-my-way-to-generate-css-utils-with-sass--ghn) to work with the object I got.

Here's the code and it was pretty simple.

```sass
    @each $display in $displayProps {
    .#{$display}{
        display: #{$display};
    }
}
```

I can just loop through the displayProps object and have to use some [interpolation](https://sass-lang.com/documentation/style-rules/declarations) .

>To generate my css class names dynamically I have to use sass interpolation . And I found out that I can even interpolate the whole property name !.

Then , I can finally check my generated CSS and it seems ok .

```css 
/* .. more and more ...  */
.block {
  display: block;
}

.inline {
  display: inline;
}

.flex {
  display: flex;
}

.grid {
  display: grid;
}
/* .. more and more ...  */
```

## Sizing utilities with SASS

For a utility base library I am gonna also need some sizing utility classes and so I have to work around some of those.

In my _variables.scss , I have to add some more classes 

```sass
$dimensions :(
    "full":100%,
    "screen":100vh,
    "min":min-content,
    "max":max-content,
    // more and more
    "2/5": 40%,
    "3/5": 60%,
    "4/5": 80%,
    "1/6": 16.666667%,
    "1/3": 33.333333%,
    "1/2": 50%,
    "auto":auto,
);

```
Using the above object, I have to generate utility classes like w-full ,h-full,w-1/2,h-screen to work with just like [tailwind](https://tailwindcss.com/docs/width) ...

So In my _utilities.scss ,

```sass

@each $key,$dime in $dimensions {
    .w-#{$key}{
        width: $dime;
    }

    .h-#{$key}{
        height: $dime;
    }
}

``` 
Pretty [s1mple](https://www.youtube.com/watch?v=ohUMqzlvnig) hah man I am so glad.

Later in my index.css , I can see

```css
/* .. more and more ...  */
.h-full {
  height: 100%;
}

.w-screen {
  width: 100vh;
}

.h-screen {
  height: 100vh;
}

.w-min {
  width: min-content;
}
/* .. more and more ...  */
```

Thank you and it is exciting to learn more about SASS with this personally !!!! 
I am gonna try generate some grid layouts later in the series.
### Feel free to suggest.
Do you want to receive a detailed notification when your model is trained ?
Tags: machinelearning, deeplearning, datascience, python
Published: 2021-11-10 13:00:30

## Have you ever wasted a ridiculously amount of time by checking manually if your Python pipeline was finished? 

[Here](https://towardsdatascience.com/create-a-simple-bot-with-telegram-that-notifies-you-about-the-progress-of-your-code-69bab685b9db) is a quick article about a package that can send you Telegram messages about your code's progress!

P.S.: Open-sourcing encourages innovation through collaboration, and [Medium](https://medium.com/) is a great tool to share your projects! If you don't know about this website, I encourage you to have a look!

* The GitHub [page](https://github.com/RomainGratier/telegram-coffee-break) if you want details!
* My personal medium [page](https://romain-gratier.medium.com/) if you want to follow me
What does a successful career look like?
Tags: discuss, watercooler, career, productivity
Published: 2021-11-10 12:57:56

A career in tech can take so many different forms that it can be difficult to define what your own personal definition of success looks like.

Are you motivated to reach a particular title or level of compensation?

Is your goal to build certain products or become an expert in certain areas?

Or are you trying to find the perfect work-life balance in a low stress environment?

How have your perceptions of success changed over time?
Things you should develop regularly
Tags: education, javascript, tutorial, discuss
Published: 2021-11-10 12:42:19

Developing a routine is one thing, but what exactly should you be doing in routine work. You have two choices; you can use [essay typer](https://allessaywriter.com/essay-typer.html) as a defence mechanism because you are late on submission. Or you can utilize the same online essay typer to improve your writings. 

That's the thing; everyone has choices they get to make daily. And following a routine is just one such choice you have to make as soon as you wake up.     

This blog describes what the routine works you can do.

●	Develop a morning routine

Setting the tone for the day is an essential part of any good morning routine. The easiest method to be more productive throughout the day is to control the mornings. You can achieve this by outlining your most important tasks at the beginning of the day. Read more about [rate my paper](https://allessaywriter.com/rate-my-paper.html)
 
●	Meditation to be prepared for any challenges
 
 So be prepared for anything the day has in store for you.

For instance, you did not invest in an essay maker expert on time, and now you are stressed. Including meditation in your daily life might help you learn how to handle stressful situations better. 
 
●	Take extra vacation time
 
Research has shown that our brains take around 90 minutes to get to the point where they require a break. That is why an essay generator can be the perfect thing when it comes to taking rest.
Our bodies utilize our reserves of energy to keep up while we work when we should be resting. This involves releasing stress hormones to give us a little additional power. Also Read about [MBA essay writing service](https://allessaywriter.com/mba-essay-writing-service.html)

●	Workout
You cannot work out two times a week and expect to feel a difference. Instead, try working out regularly for a small-time frame if you think monotonous, try different activities like aerobics, plates or varsity sports.

●	Inspire yourself by reading something positive

You don't have to read the bible or scriptures if you don't want to. However, it is not a bad idea. You can read inspirational books or listen to podcasts that make you want to improve yourself.

●	Be kind to others

You can do this by giving someone your position in a line or calling your mother. You can also be thankful to your essay creator who works so hard for you.

Even the smallest gestures may have a profound impact on the course of someone's day. People are happier when they do good deeds.

You can also be thankful to your essay creator who works so hard for you about [proposal essay topic](https://allessaywriter.com/proposal-essay-topics.html)

●	Get up early in the morning. 

Every biography of successful people shows you how important it is to wake up in the morning. 

People mainly follow routines to develop structure. Without structure, most humans are lost. Start following simple rules, and you will see a visible difference in your life.
AI in Software Testing: Is AI Capable of taking over software testing?
Tags: ai, testing, productivity, programming
Published: 2021-11-10 12:07:14

The use of AI to enhance existing tools and frameworks that identify particular testing challenges is among the trends that began this decade and is predicted to continue.

Functional testing of web and mobile applications, visual testing of user interfaces, and UI element location, and auto-correcting element selectors are all examples at the moment. Beyond that, we can see <a href="https://codersera.com/blog/ai-in-software-testing-a-detailed-explantion/">AI replacing entire technological stacks for automated testing.</a>

AI will take over automation jobs that need judgments that a human might make in less than a second at all stages of testing. Higher-order testing tasks may require human input or involvement at first. Test generation, usability testing, security testing, and edge cases are examples of jobs that demand a little extra thought.

Nevertheless, as technology advances and computers get more schooled on the behaviours of these higher-order tasks, AI is expected to take over those tasks as well, tackling challenges that require more context.

In order to make the application more secure, we are increasingly relying on Artificial Intelligence (AI). As testing becomes more automated, we may be able to delegate the majority of it to AI. 

This means that, rather of humans performing manual testing, we are gradually moving toward a scenario in which machines execute test scripts. However, only minimum human input will be necessary to assist robots in 'learning’ and improving themselves.

<h2>Benefits of AI in Software Testing</h2>

<ul>
<li>Improved accuracy</li>
<li>Going beyond the limitations of Manual Testing</li>
<li>Helps both Developers and Testers</li>
<li>Increase in overall Test Coverage</li>
</ul>

<h2>In A Nutshell…</h2>

Fortunately, there are currently a plethora of AI-powered platforms on the market, making the use of AI in testing a reality rather than a pipe dream. Artificial Intelligence (AI) opens up a slew of new possibilities for optimizing automated testing. Testers won't have to watch over their automated tests as much because they'll self-heal and run faster. 

Furthermore, Artificial Intelligence can assist in automating more delicate testing areas such as user interface testing and visual validation. Furthermore, AI can analyze enormous amounts of data and develop extensive test cases that assess the system's interface and operation down to the finest aspects.
Nextazy Solution- Build Simple, Elegant, And Secure Solutions Using Blockchain Technology
Tags: news, blockchain
Published: 2021-11-10 12:03:08

Main objective of a business should be the quality of the product. With this motto, Nextazy solutions are one such company. They are one of the top blockchain service provider companies that reinvent businesses with blockchain solutions.

Business has grown globally by the business development team that is managed under Salman Parcy ( Global Branding & Business Development Head). He has delved deep into the world of blockchain and cryptos and became one of the top crypto enthusiasts in India. He has also been an investor in multiple blockchain projects and serves on the business advisory board for multiple projects in various countries.

Source: https://nextazy.medium.com/nextazy-solutions-pro-in-delivering-innovative-solutions-through-blockchain-technology-29d702ce76ba
Discuss with us bout the future of open source
Tags: opensource, discuss, programming, community
Published: 2021-11-10 11:51:25

## Join us

We have created a new subreddit about the open-source world. Our purpose is to share, explain and propose open source ideas. We think that open source might be the best development model for the future of any type of projects.

We hope that you have interest in this subject and we invite you to be part of it! 

[Join this subreddit](https://www.reddit.com/r/myopensource/)
Google SWE Summer Intern 2022 Interview Experience
Tags: google, intern, interview, experience
Published: 2021-11-10 11:37:46

# **Google SWE Summer Intern 2022 Interview Experience**



### Time Spent Studying/Study Schedule:

I used to solve LeetCode Questions for 1.5 hr. daily on weekdays( 1 H 2M 1E ). and 3 hrs. on Weekends ( 2H 5/6M ). 

#### Study Schedule after Resume Selection/Interview Invite mail (I've got 7 days b/w my first Interview Round & recruiter's mail ):

9 hrs. a day: 2 hrs. DS&A Revisions + LeetCode Google Tagged Question. 

### LeetCode Premium?
Yes, I was using LeetCode Premium, was Gifted by the person, who referred me. 

### Summary of the Interview:

- **Round 1** (45 Mins.): 2 Hard
I was able to do 1st Completely ( explanation with code )
Unable to complete 2nd.

- **Round 2** (45 Mins.): 1 Hard Problem Consists of 3 Sub Problems
Explained & Implemented all in 35 mins. 

### What Went Well :

In Starting, The interviewer asked me, “do I know him?”, I said no, but he knows me through my **[GitHub OSS Contributions](https://github.com/Siddhant-K-code)**.

Round 2 was clean & clear because completed and discussed all three problems before time. and had a small discussion about different tech. 

### What Didn't Go Well and Why:

Round 1, Unable to complete the second problem in given time. Poor time management (my opinion). 

### What You Would Change/Not Change In Your Studying For Next Time:

Improve time management, recording yourself & solving with proper timer & analysis. 
Habits:

- Google Docs. Solving
- LC Company tagged Question
- Started with EPI ( Elements of Programming Interviews )
- Consistent Problem Solving
- Tracking of the Question with my markers, doubts, imp. points. 

### Approach: I did follow during the interview or preparation.

Explanation of Problem -> Create New Test Case/s -> Bruteforce Approach -> Complexity Analysis -> Improving the Solution -> Edge Cases -> Complexity Analysis 

### Result: 
*Rejected*

### Feedback: 

Strong in Data Structures & Algorithms, Communication and test cases. Good at Finding Edge Case, and criticizing solutions. Improve Time Management & Alternate Solutions. 

It was really a great learning experience, usually, I don't post all interview experiences. I posted this because it really teaches a lot. ***Those two weeks really made me a calm, well-disciplined person.*** 

***Also, It is a big personal achievement for me to get this opportunity being from a small city and tier 3 college ( I know this doesn't matter, but opportunities are really limited TBH )***

*I posted the same on [My Twitter as a thread](https://twitter.com/SiddhantKcode/status/1455857541577994245)*
Express vs Nest
Tags: javascript, node
Published: 2021-11-10 11:31:08

I had the opportunity to create a simple backend program with CRUD operations using ExpressJS though I've been using NestJS. I personally enjoyed using NestJS a lot more than ExpressJS because 1) ExpressJS doesn't provide a structure for your project and 2) NestJS requires less set up.

**1) Structure**
I like the fact that NestJS provides a set structure for all your projects. If you see NestJS projects you'll notice that almost all their projects are structured very similarly. But ExpressJS provides a lot of freedom for the structure of your projects. I think that there is a best practice but if you see 100 different ExpressJS projects I can guarantee that there will be more variety in project structures when compared NestJS. 

I guess that freedom is good for others but bad for people with little experience. Let's get into the details of how it is different. Let's say that there are two different modules: User and Game. Nest structures this by putting all the User related files into a folder called User. That module would have a controller, service, repository, entity, and other testing files. ExpressJS, based on my personal experience, structures their projects according to its function. For example, all the controllers are grouped together and other routers are grouped together, etc.

Nest Controller == Express Router
Nest Service == Express Controller
Nest Repository == Express Repository
Nest Entity == Express Model

**1) Set up**
Another reason I enjoy using NestJS is because everything is nicely set up for you. When I started my project there were so many errors in ExpressJS and I wasted too much time trying to figure it out. NestJS also provides a great CLI which makes it easy to get started because all the boiler plate code is already created for you.

Although learning dependency injection, inversion of control, and other weird crazy words is difficult in the beginning NestJS really helps users focus on the project at hand instead of the set up which is really convenient for me personally.
Drawing a Crescent Moon with OpenGL - GLFW/GLEW C++
Tags: cpp, opengl, 2dgraphics, glfw
Published: 2021-11-10 11:27:26

This is the 3rd article on OpenGL, drawing 2D objects in OpenGL using c++. If you haven't been following through, here is the first article where we started drawing a circle in OpenGL:

{% link https://dev.to/ishaqkassam/drawing-a-circle-using-opengl-glfwglew-c-1247 %}

In this article, we are going to draw a Crescent Moon using the concepts of circle. We'll be using 2 Circles, with different fill colors, to give us the Crescent moon effect. Let's look at the code for circle:

```

void drawCircleFill(float cx, float cy, float r, int num_segments)
{
    float theta = 3.1415926 * 2 / float(num_segments);
    float tangetial_factor = tanf(theta);//calculate the tangential factor 
    glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
    float radial_factor = cosf(theta);//calculate the radial factor 

    float x = r;//we start at angle = 0 

    float y = 0;

    glBegin(GL_POLYGON);
    for (int ii = 0; ii < num_segments; ii++)
    {
        glVertex2f(x + cx, y + cy);//output vertex 

        float tx = -y;
        float ty = x;

        x += tx * tangetial_factor;
        y += ty * tangetial_factor;

        x *= radial_factor;
        y *= radial_factor;
    }
    glEnd();
}
```
We'll call the method twice, to give us 2 circles, giving them different positions and color, to give us the desired crescent.

Let's call the function in the `main()` as below:

```
glColor3f(0.8f, 0.6f, 0.2f);//golden color
drawCircleFill(500, 400, 40, 360);
       
glColor3f(1.0f, 1.0f, 1.0f); //white
drawCircleFill(525, 410, 40, 360);
```
Notice how the `glColor3f` method works. If defined, the method implements the color to all the renders below the line, until reset. So the first Circle drawn takes the golden color, and the second Circle takes the color white. You can change the color of the second Circle to match the background, to attain the desired Crescent figure.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3na1j6vehl7jllu10h53.png)
 

That's it for this article, see you in the upcoming!

Happy coding!