teleren/devto huggingface dataset:
My Possible Futures
Published: 2021-11-07 22:39:40

We all have ideas of what the future could look like. We all have ideas to make the future better. We all have dreams about what could happen. For me, I ponder what if I could do X thing. If I could build an app, website, or technology of any kind, What would it do? A little background on me, I run the Penn State College of Information Sciences and Technology Peer Tutoring program. I have been in this role for the past 3 years now and it gives me a source of great pride for me to help my fellow peers. A personal project for me would to build a college-specific tutoring video library. This service would be similar to LinkedIn Learning where a student would select a course and follow along with the modules, but the module has short videos and links going over each topic. Each topic would be explained in a few different ways to match different learning modes and provide the best possible asynchronous tutoring experience. My goal is to provide a tutoring experience to all college students regardless of whether or not they have access to an in-person tutor. Similar to how students are automatically added to their learning management system's courses, students would have access to our service the same way. Students would go to their course, select the tutoring tab, and select the topic they are struggling with.
 
Outside of an application development lens; if money and time were of no concern; what would I do with my life and the skills I've assembled if I could dedicate it to one thing? I would create a trades school with "majors" in fields students could have a future in. These majors would be in subjects where good-paying jobs are common and may not be traditional college majors. Automotive technician, diesel technician, electrician, plumbing, programming, accounting, cyber security, among many others. The school would focus on real-world problems, experience, and building a portfolio. I feel that college inadvertently locks undecided students into believing a typical college education is the only way to go. I know it's not the case and I want a school that gives students a way to know if a trade is their favorite career path or college. I probably can say if I went to this type of school, I don't know if I would be a programmer since I love to work with my hands. If I can make anyone's career choice easier than mine, I would be fulfilled professionally!
A New Way to Watch
Tags: streaming, discuss, webdev
Published: 2021-11-07 22:28:36

##Time = Money, but what if it didn't?
The idea of money and time limits a lot of individuals when it comes to creating something. Most of the time an idea is created and instantly we think on how to market it and make it profitable. If money and time were no concern, what would I do with the skills I have obtained and my life from that point?

###The Current Situation
Over the past year I know most of us have relied on streaming services such as Netflix, Hulu, and Disney+ to stay sane. I know I have and in the beginning utilized web extensions such as NetflixParty [now TeleParty] to watch shows with friends. This however is no longer useful as we are slowly getting back into our normal routines and do not have the same amount of free time as we did before to watch shows together.

###The Idea
An application/extension that would allow for individuals to connect over their favorite shows and movies on streaming platforms. Think of it like an expansion on Netflix Party, but individuals can make their own profiles and rate shows they have seen and even have a recommendations section.

Multiple times I have had friends who are getting into new genres and be lost on where to start. Having this would allow for them to have a good stepping stone if they have friends who are fans of that specific genre. In addition, they could look at most popular shows for each genre to get a starting point.

####Features
The key features that were mention prior were having a profile, making & seeing recommendations, and looking at most popular shows based on genre. One feature I feel would be beneficial is for the user to have the ability to enable spoilers before episodes.

I personally know a few individuals who want to watch psychological thrillers/dramas but tend to avoid them because they get stressed not knowing what is going to happen. For example, when Squid Games was big my friend spoiled the show before watching due to her getting extremely anxious. By being able to enable something that just gives warnings of possible triggers or character deaths it allows for people like this to enjoy the show as they know what to expect.

##Why This?
Since streaming is such a big part of our society now, this allows for a better watching experience. I know on multiple occasions I have wanted to watch something but did not know what so either I watch nothing or re-watch something I have already seen. 
This would enable users to have an easier time finding shows based on a recommendation by genre, or even what their friends are watching so they can talk about the shows together.
I think it is important to give people the chance to watch shows they may not have thought to watch before and get the chance to experience new things comfortably.
Week 2 Task-Force 4.0 at Awesomity & CodeOfAfrica
Tags: awesomity, codeofafrica, webdev
Published: 2021-11-07 22:12:55

> Knowledge is power.

Hello again, week 2 covered 😉!! actually this week was really super cool I started rocking with working on amazing skills and best practices as a backend developer😎, you might wonder what was that ? Tech industry is a vast of technologies that are awesome to explore. With that being said I have enjoyed working on: 
###Git work Flow  
   * Creating  Features 

Trust me I've got to know the power of __Git__

### GitLab
 I have also been exposed on working on GitLab , where I have started using __CI/CD__
 which was one of the skills that I have always wanted to know and work on, plus working 
 on *__Pipelines__* was also another leveling skill. Thanks to @awesomity 's CTO👌.   

Lastly I've enjoyed an amazing presentation from my __Task-Force 4.0__ colleagues, and a great session with [@codeofafrica](https://www.codeofafrica.com/EN/team)'s Co-Founder that was on __Values__ ,truly was super✨.
C++ vocabulary for beginners.
Tags: cpp, beginners, programming, watercooler
Published: 2021-11-07 21:51:39

When I first joined C++, I was confused about some terminology, but now that I've looked it up, I understand now.
I'm here to share my wisdom in the form of a compilation of phrases I've learned.

## `lvalue` and `rvalue`  
An lvalue, or properly cased, "LValue", stands for "Left Value". Same with "RValue"; it means "Right Value".
A left value is any bit of code that can go on the left side of an expression, and is strictly limited to only being that left-hand of the expression.
Here's an example:  
```cpp
int const x = 10; // `x` is an lvalue, and `10` is an rvalue.
int y = 20; // `y` lvalue, `20` rvalue.

y = y+x; // `y` is an lvalue, `y+x` is an rvalue.
// `y+x` is an rvalue because you can't do
// `int x+y = value`.
```

## `reference`, `lvalue reference`, and `rvalue reference`.  
A reference is a tool that's used to pass a variable (or its value) around.
Consider the following:
```cpp
void updateYear(int& y) {
    y = 2021;
}

int year = 2006;
updateYear(year);
std::cout << year; // Prints `2021`.
```
They're basically similar to pointers (`T* name`), except they're dereferenced when applicable, and are ensured never to be a `null`-like value.  
What's an lvalue reference? - Well, it's not hard to explain, it's what you you **just** witnessed.
Reference usually refers to any reference, it's not specific, but before [rvalues were added to C++ (in C++11)](https://en.cppreference.com/w/cpp/language/reference), "reference" referred to the only kind of references that existed, lvalue references.  

## Copy constructor.
It's exactly what it sounds like, a constructor that copies.  
What does it copy? Another instance of the same type.
It creates a new instance of a type using an old instance.  
Here's an example:
```cpp
struct Point {
    // The following constructor is a "copy constructor"
    // because it takes an argument of type `Point`,
    // which is the same type as the class it's in.
    // (NOTE: Copying data from `p` isn't a requirement
    //        for a copy-constructor, but doing otherwise
    //        defeats the purpose of having `p`.)
    Point(Point p) {
        // I'm not using a member-initializer list to
        // be beginner friendly.
        // More people know `this.name`/`this->name` syntax.
        this->x = p.x;
        this->y = p.y;
    }
    
    int x = 0;
    int y = 0;
}
```
Highlight active menu item with scrollspy hook ⚛
Tags: react, hooks, typescript
Published: 2021-11-07 21:33:00

## What is scrollspy?

Scrollspy is a mechanism that highlights an active menu item based on current scroll position to indicate which section is currently visible in the viewport. It's available in Bootstrap ([see the docs](https://getbootstrap.com/docs/5.1/components/scrollspy/)), but right now let's implement it from scratch using React and TypeScript.

## Show me the code

Before we start, let's add some helper functions that we will use for computations in our hook. Also, this way we keep logic separated and make our code look cleaner.

```ts
// Restrict value to be between the range [0, value]
const clamp = (value: number) => Math.max(0, value);

// Check if number is between two values
const isBetween = (value: number, floor: number, ceil: number) =>
  value >= floor && value <= ceil;
```

Once we're ready with helpers, we can jump to the hook code.

```ts
const useScrollspy = (ids: string[], offset: number = 0) => {
  const [activeId, setActiveId] = useState("");

  useLayoutEffect(() => {
    const listener = () => {
      const scroll = window.pageYOffset;

      const position = ids
        .map((id) => {
          const element = document.getElementById(id);

          if (!element) return { id, top: -1, bottom: -1 };

          const rect = element.getBoundingClientRect();
          const top = clamp(rect.top + scroll - offset);
          const bottom = clamp(rect.bottom + scroll - offset);

          return { id, top, bottom };
        })
        .find(({ top, bottom }) => isBetween(scroll, top, bottom));

      setActiveId(position?.id || "");
    };

    listener();

    window.addEventListener("resize", listener);
    window.addEventListener("scroll", listener);

    return () => {
      window.removeEventListener("resize", listener);
      window.removeEventListener("scroll", listener);
    };
  }, [ids, offset]);

  return activeId;
};
```

As you can see this hook takes two arguments:

- `ids` - the list of sections IDs that we want to spy
- `offset` - optional, offset from page top, by default set to `0`

Basically, all it does is:
1. Calculating the top and bottom positions of spied sections
2. Checking if current scroll position is between these two values
3. Returning `id` of section which is currently in the viewport
4. Repeating the whole process on each scroll and resize event (since content height might change on window resize)

Also, notice that in this case instead of `useEffect` we're using `useLayoutEffect`, since it's better for DOM measurements. If you want to know more about differences between these two, I encourage you to read this great [article](https://kentcdodds.com/blog/useeffect-vs-uselayouteffect) by Kent C. Dodds.

The code should be self-explanatory, but if any part of it is unclear, let me know in the comments.

## Demo

To see `useScrollspy` in action, check out `App` component in the sandbox below 👇

{% codesandbox usescrollspy-2d9jg %}

Thanks for reading! 👋
#100DaysOfSwift: Project 17 
Tags: ios, beginners, swift
Published: 2021-11-07 20:32:42

Project 17 was a game in space where the user has to avoid objects coming their way.

Key Takeaways:

1. SKEmitterNode was used to set the background image of space with star particles. SKSpriteNode was used to display the player's spaceship image. SKLabelNode was used as the score label. 

2. advanceSimulationTime() was used to give the effect of the star particles filling up the screen. This is a method of the emitter where you can simulate 10 seconds passing in the emitter and it will update the particles as if they were created 10 seconds ago. 

3. Per-pixel collision detection is used when images you want to use are an irregular shape. The collisions are based on actual pixels from one object touching actual pixels in another. 

4. Timer is used to run code after a period of time has passed, either once or repeatedly and it has five parameters:

   1. timeInterval: how many seconds you want the delay to be
   2. target: what object should be told when the timer starts 
   3. selector: what method should be called on the object 
      when the timer starts 
   4. userInfo: any context you want to provide 
   5. repeats: whether time should repeat 

5. linearDamping was used to make the objects the user has to avoid in space consistently move across the screen. angularDamping was used to make the objects consistently rotate. They are both added to the physicsBody and set to zero.
Upgrading to MacBookPro 2021 and Monterey
Published: 2021-11-07 20:25:19

Step 1) open MacBook Pro box and marvel at the hardware design.  It reminds me of my MacBook Pro 12" which was probably my favorite Mac hardware until now.  Why? Imagine carrying an extra battery in your backpack and it only takes 5 minutes to swap batteries. 
Step 2) Boot into recovery mode by holding down the power button.
Step 3) Erase the HD with APFS (Case-sensitive) Why? Because changing capitalization of files and committing them to GIT on a non case sensitive hard drive partition is a huge headache.  
Step 4) Re-install the OS
Step 5) Try to install Dropbox, be disappointed that it does not natively support M1 and decide to abandon Dropbox.  Why?  All I want dropbox to do is sync files between devices and make it easy to share large files.  Why the crap have they not updated it to work with M1 by now?  My bet is that since they have added a ton of useless features over the years that it is a large undertaking to rewrite.  Shame on them.  Why not let folks opt into all the extra shit?  I already pay for extra storage on iCloud so going to try using that for a while.  
Step 6) Install Node via nvm.  https://github.com/nvm-sh/nvm
6a) install the latest version of node which supports M1: `nvm install node`
6b) install node 14 for my older projects by creating a Rosetta version of the terminal and running `nvm install 14` [more info]( https://www.courier.com/blog/tips-and-tricks-to-setup-your-apple-m1-for-development)
7) Install [Swish](https://highlyopinionated.co/swish/) - How it the world have I not found this awesome window management tool until now!
8) Install 1Password, Bartender (works great with the notch), VSCode, iClip, Arq Backups, Bear, Xcode and all my other favorite Mac apps.

Sidenote: I am upgrading from a 2015 MacBookPro 2015 where 70% of the time, the fan was running at 100%.  So far on the 2021, the fan has not even turned on.  Wow!
Using R Libraries and Working with Data
Published: 2021-11-07 20:23:48

Packages in R can contain code, data, and documentation. These are stored in libraries, and provide functionality features to R, like reading .csv files. Packages can be installed with the install.packages() command. 
Example: 

``` install.packages("readxl") ```

Whenever you use a library that is not native to R, it must be loaded into R by using the library() function. 

``` library("readxl") ```


Excel files can be read with the read_excel() function. 
``` read_excel("/filepath/file.xls) ```  

Similarly, data from a .csv file can be stored and accessed like this: 

``` data <- read.csv("/filepath/datafile.csv") ```
 ``` data ```

That should show you the rows and columns from the .csv file, which you can then perform operations and analysis on. 


More useful functions for working with data files: 

readLines() - read text file into character vector
write() - export a dataset as text file
write.csv() & write.table() - export a dataset as .csv file 
write.xlsx() - export a dataset as Excel file
save() - save R objects in .RData files
What is Bootstrap?
Tags: twitter, beginners, webdev, programming
Published: 2021-11-07 19:59:46

Imagine wanting to create a weekly news webpage. You want to write new content each week. You want it to look consistent from week to week. Once you have your first week coded and full of your weeks content, wouldn't it be nice to just have to put the next weeks content in without having to redo the entire webpage? Also, working smarter not harder is key. So how can you accomplish this? Bootstrap to the rescue!

Bootstrap is a free toolkit and was created by Twitter developers to allow users to create quick and consistent webpages with ease. Its a collection of prewritten code for you to use. Prior to Bootstrap, developers would have to create common webpage features over and over again just hoping they could make it consistent with what came before. With Bootstrap you can have consistency with your fonts, font size, colors, and more. Bootstrap is one of the most popular tools in creating webpages! You can use it with HTML, CSS and JavaScript code to design layouts for your content.

To learn more and to get started with Bootstrap, go to: https://getbootstrap.com/

Happy Coding!
What if time and money weren't an issue?
Published: 2021-11-07 19:54:30

What app, website, or technology would you create if time and money weren't a problem?

There are a number of problems in the world that could be solved if the right technology were to be created for them, but I can't say I'd be fully passionate about any of them. In classes, I've had countless professors start by saying "what's an app you could write to solve a problem?" and then you spend the rest of the semester writing a mediocre app that meets their requirements to solve that problem. 

If I'm being honest, at this point I'm out of ideas. So often when you start to design an app to solve a problem you find that apps already exist for that problem and you just end up comparing yours to one that people already use instead of making it the way you want it to be.

With that being said, if I had all of the time and money I needed, I would design a video game. A video game may not solve any problems, but it would provide a source of escapism for people, allow for skill development, and connect people around the world through online play. I haven't fully decided what kind of game it would be, but I would lean more towards an action and adventure game that you can play with your friends and updates would allow for more world expansion and customization.

It may not be a life changing solution to a problem, but I think it'd be really interesting to learn how to develop a game. As of now, I'm no where near prepared to create a video game, but I'm always open to learning new things, so maybe someday.
WellKid – Turn Me On ft. Olamide, JamoPyper
Published: 2021-11-07 19:50:25

Fast emerging Nigerian artist, WellKid has released a new single named “Turn Me On” for your listening enjoyment.

Advertisement
On this outstanding track, WellKid enlists the help of award-winning Nigerian composer and rapper, Olamide, and Zanku Records artiste, JamoPyper.

JamoPyper sought Olamide’s gifts on “O Nana” a while back and it was a hit, so this song “Turn Me On” is a potential hit and we encourage you to add it to your playlist.

In furthermore, Eskeez, a brilliant music producer, developed the new song, which acts as his debut for the year.

https://sololoaded.com/wellkid-turn-me-on-ft-olamide-jamopyper/
#100DaysOfSwift: Project 16 
Tags: ios, beginners, swift
Published: 2021-11-07 19:45:04


For project 16, I learned about MapKit which is really simple to create! 

Key Takeaways:

1. The view controller should be set as the delegate for the map view because it will control or modify the changes that are made to the map view.

2. MkPinAnnotation creates a pin on the map.

3. A delegate is a controller object used to control or modify behavior of another object. 

4. addAnnotations can be used to add multiple annotations at once to the map.
Having fun with pendulums in ThreeJs
Tags: javascript, typescript, webdev, threejs
Published: 2021-11-07 19:36:56

I was messing around with **ThreeJs** and got an idea of a simple but interesting animation. Here is the video of how I turned it into reality.

{% youtube 43WXC0rPKcE %}

If you just want to see the end result, go ahead and click [here](https://threejspendulums.nordicbeaver.io/).
My Dream App
Tags: ist402, webdev
Published: 2021-11-07 19:24:01

Ever since I was a kid, I've always loved computers, my parents say that I could use a laptop before I could walk. Ultimately my passion for computers and technology have driven me down the road I'm on now. 

I think that technology and coding should be introduced to kids sooner, as sometimes you don't find out what you want to do until much later, when it's harder to learn with limited time. 

I want to create an app or educational program that encourages kids interested in technology to venture further. Something that schools could use and integrate within their own program. With varying levels of complexity so that lower grade levels can still participate. It would specifically be designed for K through 12 teaching, as most colleges have the upper level learning that can get a student to where they need to be for their future. 

Putting more emphasis on exposing kids to technology early is important, as it can get swept under the rug in many cases. Implementing a small class in middle school that would expose kids to the potential, then having more advanced elective classes in high school.

With no concern of time or money, I would promote the importance of tech and it's implications on developing society. It's an important thing to wield, and ensuring it's in the right hands with the right intentions is just as important. As easily that technology can make life easier/better, it can just as well make it worse, less private, less safe. 
I want to ensure that technology is advanced and developed for the good of society, rather than used as a way to use or manipulate it.