teleren/devto huggingface dataset:
Writing a Package Manager for List Prolog 
Tags: packagemanager, listprolog, github
Published: 2020-03-22 23:35:26

--- 
title: Writing a Package Manager for List Prolog 
published: true 
description: What a Package Manager is 
tags: package-manager, list-prolog, github
--- 



I recently wrote List Prolog Package Manager (LPPM) - an online registry and installation tool for repositories my algorithms depend upon, where my algorithms are in a programming language called List Prolog, run by my SWI-Prolog interpreter algorithm. 

What a Package Manager is

A package manager, by my definition, is a registry editor, viewer and installer of repositories (and their dependencies). Dependencies are other folders, or repositories on GitHub that contribute algorithm parts to the main repository. The repositories are side by side, they may rely on each other and commands are run from within folders. For LPPM, all the required dependencies are "at the top of the page" or in the main repositories' entry, they are not scattered through the registry. Also, I cut versions, ratings and download counts (for the sake of simplicity) because, arguably, everything's latest version should be compatible with everything's latest version (requiring careful testing) and ratings and download counts shouldn't matter in an ideal world. 

Adding a Registry Entry to LPPM 

In the screenshot below, you can see the registry entry HTML file on the Prolog server (actually my Mac acting as a local host). You can enter the repository's user name, repository name, description (with additional installation instructions in case it relies on an API or non-GitHub file somewhere else) and its dependencies (more user/repository pairs). 

![Adding a Registry Entry to LPPM] (https://1.bp.blogspot.com/-Ff9deWzGUIY/XnfxVJk0MZI/AAAAAAAAHZk/px9uypI-Y6AbrGepAG8OXE1-XKl0GWFkgCLcBGAsYHQ/s640/Screen%2BShot%2B2020-03-23%2Bat%2B10.03.40%2Bam.png "Adding a Registry Entry to LPPM")

Viewing the Registry 

In the screenshot below, you can view the registry for LPPM (which is on GitHub). It lists the repositories (or packages when they include their dependencies) and registry editing and installation instructions. 

![Viewing the Registry] (https://1.bp.blogspot.com/-rR6BEFu9_iM/XnfxWML338I/AAAAAAAAHZo/Q09cBSwWCC0yDwPW9WO43XsKwk5_mwYeQCLcBGAsYHQ/s640/Screen%2BShot%2B2020-03-23%2Bat%2B9.47.27%2Bam.png "Viewing the Registry")

List Prolog and "Everyone's Myness" 

One of the best things about writing a Package Manager is it gives you ownership of your programming language's repositories. I can customise the PM and keep it on my server. Also, PMs encourage users to store files in their own repository rather than in one folder, preventing problems of replacing needed files. And you can install packages with a single command rather than clicking on multiple web pages. 

Lucian Green 
https://github.com/luciangreen/List-Prolog-Package-Manager
Save The Title For Last
Tags: writing, learninpublic, notetaking
Published: 2020-03-22 23:17:34

When I think I have a vague idea for a blog post, my first inclination is to come up with a title. In part, this is because I want a concise way to capture the idea in my notes, that way I can follow up on it later and elaborate. There is something more fundamental behind this tendency. I am trying to categorize the idea, to fit it into a hierarchy of ideas. I want a logical place to store it, both in my mental rolodex of ideas as well as in my notes.

I've labeled a thing before I even really know what it is. I'm setting a course for my thinking, rather than letting my thinking develop more spontaneously. I'm deciding what I want the conclusion to be which from the start is cutting me off from a whole swath of possibilities. In trying to put a title or a label on my thinking from the outset, I am hindering my thinking process.

This reminds me of how Sönke Ahrens talks about labeling notes in [_How To Take Smart Notes_](https://www.amazon.com/gp/product/1542866502/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1542866502&linkCode=as2&tag=jbranchaud-20&linkId=48def4550e9ceb5f191f5e9eab6e251a). There is not some given structure of topics that our ideas and writing will fit into. That structure is the result of our thinking. The process of writing and developing ideas leads to the development of topics and their relation to one another. I've got it backwards when I try to start with the title.

Ahrens goes on to explain that there are two approaches to coming up with and structuring topics. These approaches come down to thinking like an "archivist" and thinking like a "writer." The archivist is preoccupied with how to store the thing. This is a mindset that leads to things collecting dust. And it really only works if there is a robust structure in place for the archivist to work within. The writer on the other hand is focused on retrieval, thinking about the context of the idea and how it is connected to other ideas.

As a writer I am expanding existing content, making connections, and developing new ideas. I can't do these things with an archivist mindset. I can't do them if I've constrained an idea with a title before I've had a chance to develop it.

My goal then is to save the topics and titles for last. Whether I am doing some [note-taking](https://dev.to/jbranchaud/deliberate-note-taking-llh) or turning existing notes into a blog post, I hope to give the idea room to grow before putting a label on it.

---

References:
- [How To Take Smart Notes](https://www.amazon.com/gp/product/1542866502/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1542866502&linkCode=as2&tag=jbranchaud-20&linkId=48def4550e9ceb5f191f5e9eab6e251a), Sönke Ahrens

Notes:

The title I choose has implications for how myself and others will approach the writing and how we will recall it later.

A lot of blogging platforms don't have robust draft post capabilities to begin with. That many of them require a title before you are ready to publish makes it all the more challenging.
It's not a bug it's a feature
Tags: productivity, motivation, tutorial, study
Published: 2020-03-22 23:03:09

So here it is ... corona time. I'm writing this post after one week of full remote work. I worked remotely before but I never had one week home office. I think many of us (developers) are in the same position. I think we are very lucky because we can work remotely. Today I want to share with you what changed in my work life because of the corona.

### Self-discipline
I've always been a bit lazy. Now I had to make a plan to get the sh ** t done in a situation when I am alone in my room (cave). It's so hard when you see a fridge or couch. But I found a way how to deal with that.

#### Rule # 1
I must be an early bird. If I woke up too late I can't focus. So I wake up about 6 a.m.

#### Rule # 2
I needed to take care of my education. So I created a learning sheet where I have sections from a course that I learn now (MongoDB). This helps me know where am I on a timeline of this course.

#### Rule # 3
I slice my daily routine to time blocks. I work full time as a Software Developer so I need to deliver value to a company. It's look something like that:

07:00 - 08:00 -> Code review
08:00 - 10:00 -> Code session
10:00 - 10:30 -> Standup
10:30 - 11:00 -> Coffee break
11:00 - 13:00 -> Another code session
13:00 - 13:30 -> Lunch time! + another coffee
13:30 - 14:00 -> Code review
14:00 - 15:00 -> Last code session

#### Rule # 4
Less social media. For now, everywhere you go you just see articles and content about coronavirus. It's so demotivating. I decided to avoid all media where I can get news about it. Result? I have 1-2 hours for my side projects.

#### Rule # 5 - the most important
Use this hard time as an advantage. Do you know that a person who works as a bus driver or waitress can't do their job remotely? When you realize that we as programmers can do our job as before pandemic, you will find advantages of this situation.

For me it was easy. I had 7 side projects deep in my drawer. Now I refreshed my website. Created a landing page for my e-book and tomorrow I want to try to create my first Youtube video. Why I didn't do that before? Because I was in my comfort zone and I didn't underestimate the time that I have. I still have 24h per day but I try to use it smarter.

## Summary
Make something cool when you stay at home. Please share with me how you manage your time during corona time. Are you doing some side projects or something for your education? Let me know.

## Invitation
I created a group on #slack where you can share your ideas, knowledge or find answers on questions about the programming world. Feel free to join us. We are Octocode CREW. You can join us using this link: https://octocode.io/slack
What I learned as a Junior Software Developer at a startup
Tags: javascript, junior, developer, career
Published: 2020-03-22 22:57:56

Hello 👋🏿, I'm a Software Developer specializing in Javascript (JS) mainly the MERN Stack (Mongo DB, Express.js, React.js, Node.js). I just hit my 1-year junior dev anniversary and thought of sharing my experience in the industry.

Here is what I learned after 1 good year junior deving at a startup:

## 1. 📖 Continuous learning

The startup was mainly a Javascript house, which I had very little experience with since I worked with PHP in my final year internship. However, I was up for the challenge to learn Javascript from the ground up. After a month, I slowly fell in love with the MERN Stack and with how it works and became pretty good after 3 months. It used to take me a day (6 - 8 hours) just to spin up an API with CRUD (Create, Read, Update and Delete) functionality, now it takes me less than an hour depending on the functionality.

The key takeaway was to be hungry and willing to learn a new tech stack and get obsessed with it so much that you become a beast 💪 at it.

**MERN Stack** - is a javascript web development framework consisting of MongoDB, ExpressJS, ReactJS, and NodeJS for building web apps.

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

## 2. 🏎️💨 High-velocity

Being in a start-up, I carried so many responsibilities. One day I could be doing customer service, the other consulting or software deving. I found this challenging at first since all I wanted to do was be a software dev. I soon realized that's the nature of startups they "pivot" a lot and your skills pivot along with it, especially to keep clients happy and engaged.

## 3. 🤝 Expectation management

Managing expectations was probably the hardest part for me since I thought I could code the shit out of anything. I later realized that when working on a project the easiest part is actually coding/building the feature or app service, the hardest part was accounting and managing all the unforeseen hurdles like changing business priorities, external factors, etc.

The best way we got around this as a team was through using [Trello](https://trello.com/), daily stand up meetings and bi-weekly sprint planning sessions to visualize all the projects in progress and manage priorities accordingly.

## 4. 👨‍👨‍👦 Dev Team

The dev team was probably the best part, everyone was always willing to help and share their knowledge. I learned so much from everyone and we all had a good time pair programming which was amazing in sharing skills and hyper-productive. We also went to dev meetups and events around Melbourne mostly the [Junior Dev Melbourne](https://juniordev.io/) events.

Overall, it was a great first year as a software developer and I feel more confident in taking on larger, challenging projects and working with great devs to make better software for all.
The Walkthrough: Plus One (LeetCode 66)
Tags: tutorial, javascript, leetcode
Published: 2020-03-22 22:44:20

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

If we’re given as an array the integer ‘123’, we simply want to increment the last digit and return the corresponding array representing that integer.
The first thing that should be pointed out is that we want to iterate via the given array backwards. A couple of edge cases that should be discussed is if the last digit of the number is ‘9’.

If we’re to encounter a case where the last digit of an integer value is ‘9’, then we set that index value to zero and then continue iterating. If not, then we’re working with a case where the last digit is anything but ‘9’ and in that case we simply increment that value of the digit and return the array of that integer.

Now if the last digits is a ‘9’. We simply set that digit to 0. The __*for*__ loop will continue setting digits to ‘0’ if they’re ‘9’ and eventually will return the array. However, if we don’t return the array, that means we would have been dealing with a number that was for example: 9, 99, 999, 9999, etc. In that case, the array returned will contains all 0’s. The __*for*__ loop will break in that case. We need to resize the array in that case.

__*Example:*__ If we have 99, we return 100 which includes an extra digit.
When using languages like Java, we’ll have to resize the array if we’re to increment the last digit ‘9’.

{% gist https://gist.github.com/zohaibshahzadTO/dfc02271fdbf7920e32c6fc76cd73a27 %}

Taking a look at line 9 above, that’s where we re-size the array if the last digit of the integer value is ‘9’. [digits.length + 1] basically says before our integer was ‘99’ and by adding an extra digit length to it, it now becomes ‘100’. We add one digit size to the array which then sets all values in the array to ‘0’ by default.

{% gist https://gist.github.com/zohaibshahzadTO/31d99cc9dd64452d6527370369fa59ee %}

Direct your attention to line 11. Line 11 would be how we re-size the array in Javascript. Destructuring array’s have many benefits and but destructuring as a whole is an article for another day. [1, …digits] basically says we’re inserting a digit value of ‘1’ in front of whatever the rest of the integer value is.

__*Example:*__ If we were dealing with [9, 9], we would end up increasing each digit value to [0, 0]. We would then add another placeholder of 1 to the beginning: [1, 0, 0].
Code like a Fullstack girl updates #3
Tags: codenewbie, codequality, git, javascript
Published: 2020-03-22 22:43:27

Hi, everyone!

As I'm tired of saying (and you of reading), I decided to focus almost all of my quarantine time on studying. This first week I've made the Bootcamp "Code like a Fullstack Girl", but I still can't understand how the platform promotes the course as something that "prepares you for the job market" - and even asked my resume for sending the certificate - and at the same time is something almost meaningless.

The platform itself is not that good, and I have zero professional experience inside or not the area and lying just to obtain an ornament for my LinkedIn doesn't look like something someone who's searching for a job and stability would actually do. 

I had finished all 21 courses yesterday, as I said I would, and my opinion remains the same: we need more practice and less "pretending to care about your career" stuff. Besides that, why does the course name highlights the presence of women when men have more prominent roles (ranking, teaching...)? How am I supposed to "code like a Fullstack girl" if I'm being taught by men? Actually, is there any difference? Did you think about the diversity of women that could teach and mentor this project?

Even though I disliked many things about these courses, it was good to take notes about platforms, languages, and frameworks which are essential for this career. I can still remember some things that were taught, but I need to exercise my knowledge a lot if I wish to be a full stack developer.

I think that's it for this post so good night!
COVID-19 Map Timeline with Vue 3
Tags: showdev, vue
Published: 2020-03-22 22:01:00

I made a Coronavirus spread timeline focusing on currently infected. 

Website:
[https://covid-19-timeline.netlify.com/](https://covid-19-timeline.netlify.com/)

Code can be found on [GitHub](https://github.com/gautemo/covid19-timeline).

The project was created with Vue 3, which is currently in [alpha](https://github.com/vuejs/vue-next). [Vue roadmap](https://github.com/vuejs/vue/projects/6). I would say that Vue 3 is really good and I'm looking forward to the release. It also uses the [Google Maps API](https://developers.google.com/maps/documentation/javascript/tutorial), hosted with [Netlify](https://www.netlify.com/) and [Google Cloud Functions](https://cloud.google.com/functions) as a proxy over the [https://thevirustracker.com/api](https://thevirustracker.com/api) to allow CORS request.

![Stay Safe](https://media.giphy.com/media/mo8MAe2maHrva/giphy.gif)
Earn It: Earn less privacy or get bankrupted
Published: 2020-03-22 21:52:24

Recently I started hearing about the "Earn It" act, and this act is no less than an attempt by the US government to kill free speech online. While sounding outlandish the entire proposal is broken and you should fight against it. Now don't just blame the Democrats or Republicans, this is a bipartisan idea, both sides having supporters. Now to continue we need to know what the "Earn It" act is. In short is a child safety online act, mostly geared towards sexual abuse and exploitation of children online. While on the surface that is a good idea, there is a lot of experts saying that this is an attack on encryption. Section 203 says that you have to EARN protections and with who is supporting this bill, one of those things to earn protections is most likely going to be about encryption, even if not being mentioned directly.

What does this mean, while I am no expert and not every last thing is known but some things I can make an educated guess on.
- VPNs will have majority hurt, even if I hate VPNs for their advertising they do have some uses.
- Cryptocurrency is most likely going to be either damaged severely or even temporarily killed.
- HTTPS might be used less on large websites.

This isn't just bad for developers, this is bad for every last human being who lives and breathes. Even if they don't use internet, they can still be harmed.
100DaysOfCoders are getting free plans at Vay
Tags: 100daysofcode, challenge, free, startup
Published: 2020-03-22 21:32:48

Hey 100DaysOfCoders,

My name is Carter Harrison, and I am the founder of Vay — a startup that builds simple APIs on top of open data.

I learned how to code by building, not by taking online courses or by going to college. In my opinion, #100DaysOfCode is the fastest and most effective way to learn development. Because of this, we are giving away free starter plans to support those who are attempting the #100DaysOfCode challenge.

You'll get access to all of our APIs free of attribution, and 50,000 monthly API requests for 6 months.

[Click here](https://vay.studio/100/) for more info
Hardest text file to parse 🚨
Tags: challenge, opensource, go, hard
Published: 2020-03-22 21:27:31

USGS Datasheets are incredibly hard to parse, just look at [One](https://www.ngs.noaa.gov/cgi-bin/ds_mark.prl?PidBox=AE8289). At least they provide a [46 page spec](https://www.ngs.noaa.gov/DATASHEET/dsdata.pdf). They are full of edge cases and nuances.

I needed to parse them for my startup [Vay](https://vay.studio), here is my attempt in golang: [https://github.com/carterharrison/dsdata](https://github.com/carterharrison/dsdata). It is open source so feel free to make improvements.

It is a fun challenge, you should give it a try to hone your skills.
Re:Plain Rocks!
Tags: opinion, help, website, healthydebate
Published: 2020-03-22 20:24:30

##Summary
I been doing some research on getting a website chat application in with my React/Gatsby App. I am looking for something pretty simple for budget conscious clients.

Crisp although it has a free tier, the free tier is very limited. Intercom has all features and more, but is pricey.

### My Requirements
The requirements would be 
- Budget Friendly (Free tier preferably)
- User notified in live time when someone sends message to phone, email and / or fb messenger
- Ability to customize welcome message

###Nice to haves
- Ability to create simple chatbot to answer common questions (Like on FB Messenger)
- Online vs Offline modes (i.e set hours of operation for when representative is online)

*Which chat platforms are developers today using for smaller clients, what would you recommend or are you creating your own!?*

Please let me know your recommendation or what you use below and why!
What's the need for a Personal website? 
Tags: website, google, portfolio, company
Published: 2020-03-22 20:15:51


Do you know that having a personal website for yourself, your services or company is the new resume/portfolio and also a subtle requirement for people to trust you, do business with you or hire you for a job in a global space. 
No do i really need a website?
Yes, you do and I will tell you why. I have read stories about Human Resource Managers searching on Google to know if they can find any useful information about potential employees, today i searched for my friends names and i was wow. Also, if they happen to find any, they’ll will judge them by their online content.

Now you need need to ask yourself this question,
What do people see when they search my name on Google? 
If you are producing online content in your area of expertise that will help people and promote your work too...

Having a personal website gives you leverage to promote your content thereby  which help to showcase your work. 
Let’s say I have a business deal with some dev.to and we haven’t met but online. They’ll like to know more about me and they’ll definitely search “Michael Olanrewaju” on Google to know what kind of person I am. If that happens, I am glad my personal website will pop up😊. 
 
Having a personal website helps you to influence people and add value to people by sharing your knowledge and ideas. 

*The more you create online content for people to consume, the more you influence them.*

I know you might say, “well, I have Facebook, Instagram, Twitter accounts etc.” These are very important social media accounts you should have but that isnt complete.

*do you know there are 3.2 billion searches on Google per day.👈*

 That’s because people are looking for solutions to there problems. Will they find you online?

Let me know what you think.
Kindly click the 👏 button
 if you enjoyed this article.
Say hello to me here
https://wa.me/2348125783528
Angular: unable to display data in the view
Tags: help, angular
Published: 2020-03-22 19:50:31

Hi!

I am a bit stuck with Angular HttpClient.

I am fetching data from an API via a service.
```js
//my service
export class CoronaService {

  constructor(
    private http: HttpClient
  ) { }

  getAll() {
    return this.http
      .get('https://covid19.mathdro.id/api')     
  }
}
```
My component looks like this
```js
export class AppComponent implements OnInit {
  
  corona = [];

  constructor(
    private coronaService: CoronaService
  ) {}

  ngOnInit() {
    this.coronaService.getAll().subscribe((response: any[]) => {
      
      this.corona = response;
      
    }, err => {
      console.log('Error', err);
      
    });
  }

}
```
My view where the problem is

```html
<p> {{ corona }} </p>
```

I get this as out`[object Object]`

If I do this 
```html
<p> {{ corona | json }} </p>
```
I get the json data.

If I try to access a property I get an error `cannot get property x of undefined`.

I tried to figure out but in vain. Can you tell me where error is?