teleren/devto huggingface dataset:
Database Authority Andy Pavlo Joins Fauna as Technical Advisor
Tags: advisor, database, serverless, jamstack
Published: 2019-12-04 22:43:52

Author: Chris Anderson
Date: April 25, 2019
[Originally published on the Fauna blog.](https://fauna.com/blog/database-authority-andy-pavlo-joins-fauna-as-technical-advisor)

----

Fauna is proud to announce that Dr. Andy Pavlo, Assistant Professor in the Computer Science Department at Carnegie Mellon University, has joined as a technical advisor. Andy’s deep expertise in database query processing systems will play an important role in the development of FaunaDB’s SQL capabilities. At Fauna, he joins notable database expert Daniel Abadi, Darnell-Kanal Professor of Computer Science at the University of Maryland, in helping build a globally distributed database optimized for cloud environments.

FaunaDB is the first enterprise distributed database to leverage Professor Abadi’s work on the Calvin protocol. This protocol provides the mathematical basis for FaunaDB’s globally replicated ACID transactions, allowing FaunaDB clusters to operate correctly regardless of wall clock time. This means that FaunaDB is robust and correct, even in chaotic cloud deployments.

According to a recent report by [Jepsen](https://fauna.com/blog/faunadbs-official-jepsen-results), FaunaDB offers strict-serializability, the gold standard for transactional consistency. This isolation level makes FaunaDB suitable for mission critical workloads like financial ledgers, booking and hospitality markets, and customer identity management, where data integrity is paramount.

Building on this foundation, FaunaDB is now adding [polyglot APIs](https://fauna.com/blog/new-platform-apis-graphql-cql-sql) including GraphQL, CQL and SQL to interact with a shared set of data, while preserving all the core correctness, quality of service, and security guarantees that FaunaDB offers. We look forward to collaborating with Dr. Pavlo and leveraging his expertise in query processing to innovate at the database interface layer. Our goal is to deliver a database that serves different developer needs without sacrificing the foundational correctness, scale and reliability that are table stakes for an operational database.

“I am impressed with the work Fauna has done in developing and delivering a distributed database based on Dr. Abadi’s groundbreaking research on Calvin,” said Pavlo. “FaunaDB combines the flexibility and agility of first-generation NoSQL systems with the strong transactional reliability guarantees of enterprise relational DBMSs. To be sure, this is not an easy engineering feat. Its use of Calvin’s deterministic concurrency control protocol to maintain consistency is unique to the industry and solves the notoriously difficult challenges of operating in multi-cloud environments.”

Read the full press release [here](https://www.prnewswire.com/news-releases/distinguished-database-authority-andy-pavlo-joins-fauna-as-technical-advisor-300838076.html).
[Go] Ensuring struct has implemented interface
Tags: go
Published: 2019-12-04 22:31:43

### Structural typing vs Class-based interface
In other OOP languages, the interface is a contract by implementing class. By Contrast, Golang checks the interface implementation for struct when you call struct with interface, not by implementing struct.

Let's see some code

C#
```c#
interface IMessageService{
  void Send()
}
// compile time error to show the class doesn't implement the interface
public class MyService: IMessageService{

}

```

Go
```go
func main() {
        // compile time error happens when using it
	var service IMessageService = &MyService{}
	service.Send()
}


type IMessageService interface {
	Send()	
}

type MyService struct {

}

```

### Can we check the interface implementation before calling it?
Of course, we can. There're 2 options to do this.

- Constructor returns interface:
```go
func NewMyMessageService() IMessageService {
	return &MyService{}
}
```

- Using underscore to do check
```go
var _ IMessageService = &MyService{}
```


In case you have multiple interfaces to implement:

- Embedding multiple interfaces into one, and return it
```go
type IMyService interface {
	IMessageService
	IEmailService
}

type IMessageService interface {
	Send()
}

type IEmailService interface {
	SendEmail()
}

type MyService struct {

}

func NewMyService() *IMyService {
	return &MyService{}
}

```
Or
- Using underscore to do multiple checks
```go
var _ IMessageService = &MyService{}
var _ IEmailService = &MyService{}
```


### Underscore is more useful

"_" is also useful to  check whether the 3rd party struct has implement client side interface.

```go
import(
   "thirdparty"
)

var _ IMessageService = &thirdparty.NotMyService{}
```
C-Basics Ex8
Tags: replit, c
Published: 2019-12-04 22:21:12

8. Write a C program to convert specified days into years, weeks and days.
Note: Ignore leap year.
<p>
Test Data : <br/>
Number of days : 1329<br/>
Expected Output :<br/>
Years: 3<br/>
Weeks: 33<br/>
Days: 3<br/>
</p>
{% replit @MathPurpose/Ex8 %}
About Eliot Pargament
Published: 2019-12-04 22:15:00

Eliot Pargament of Arkansas has been a farrier since 2011. Eliot has earned the credential of Certified Farrier. 
Eliot Pargament of Arkansas completed his first farrier training at the Tucson School of Horseshoeing in Tucson. Eliot then went on to complete a training program at Kentucky Horse Shoeing School in Richmond, KY. The Kentucky school is often considered the “Harvard” of horseshoeing school. 
After serving as an apprentice in the Washington DC area, Eliot Pargament Arkansas began his own business Metro Farrier Services. 
Eliot Pargament of Arkansas has worked closely with Mike Poe, a Maryland farrier known for difficult shoeing procedures. Eliot then served at the University of Maryland as an assistant instructor with Mike Poe. 
Eliot Pargament of Arkansas has served as a traveling farrier at various rodeos. Eliot has attended various training seminars and horseshoeing competitions around the United States and in Hamburg, Germany. 
Eliot Pargament Arkansas specializes in all breeds, and his treatments include all breeds and disciplines, all hunter, clips, corrective and lameness shoeing, custom blacksmithing, draft horses, dressage horses, venters, general farrier work, handmade shoes, hot shoeing, hunters, jumpers, laminitis treatment, mules, regular shoes, and trims. 
Eliot Pargament of Arkansas is considered very dependable and has done farrier work for National Park horses as well. Eliot has also served as an employed farrier at various stables in the Washington DC area. 
Eliot Pargament Arkansas considers continuing education very important, as new and improved techniques are always important to keep up with. 
Eliot Pargament of Arkansas provides shoeing services in Washington DC, Maryland, Virginia, and Delaware.
C-Basics Ex5
Tags: replit, c
Published: 2019-12-04 22:06:38

5. Write a C program to compute the perimeter and area of a rectangle with a height of 7 inches. and width of 5 inches.
<p>
Expected Output:<br/>
Perimeter of the rectangle = 24 inches<br/>
Area of the rectangle = 35 square inches<br/>
</p>
{% replit @MathPurpose/Ex5 %}
Best Practices with Container Registry
Tags: repository, docker, containers, devops
Published: 2019-12-04 21:53:15


With the announcement of JFrog Container Registry, I wanted to share several thoughts about some patterns and best practices regarding container registries.
 
 
<B>Use multiple repositories</B>
 
In many organizations there are clear and well-defined policies regarding permissions. In some companies, members of one team can’t access the images of other teams (in some cases they shouldn’t even be aware of the existence of those projects)
 
Although you could probably define fine-grained permissions based on image names/paths, an easier and more maintainable approach would be to define it by repositories!
 
<B>Use Build Promotions</B>
 
The main idea here is to ‘promote’ your builds (images) to more mature repositories as your artifacts graduate through the CI/CD pipeline.
This means having different repositories for the different CI/CD phases (e.g., dev, qa, pre-prod and prod).
Then, your runtime (e.g., K8S cluster) should pull images only from a production-level repository.
This best-practice goes hand-to-hand with the previous one of having multiple repositories.
 
 
<B>Always use Virtual Repositories</B>
 
A virtual repository is an aggregate of one or more repositories. It allows you to manage this group while providing your clients (developers, build jobs and consumption sites) a single and stable URI.
When always exposing your repositories through virtual ones (even when you have a single repository) you essentially guarantee that maintenance will not require changes on the consuming side (jobs, developers, etc.…).
 
<B>Always Publish Build-info</B>
 
If your container registry supports it, always publish build information along with the image you build.
For example, dependency information about what actually resides in the image itself.
Let’s discuss an example:
Suppose you are building a Java web application (WAR file) and put that in a Docker image.
Your Docker image doesn’t have a direct dependency on the Java application. In Docker, dependencies are always in the form of Docker layers.
Having in your build information the dependencies themselves (i.e., the Java application and its own dependencies) will greatly help with traceability, scanning and management of the process.
 
 
<B>High Availability</B>
 
Well, I can’t finish the discussion of container registry best practices without mentioning HA.
You should be aware that your K8S cluster becomes quite unusable if it can’t access the container registry.
It is though, extremely important to connect your runtime container environments to a stable, enterprise grade, Docker registry that provides High Availability.
Bootcamp challenges and how I have adapted in the last few weeks
Published: 2019-12-04 21:42:54

It's been almost two weeks since the Bootcamp started. There has been a lot of learning, challenges, and feedback. As hard as the challenges were, I managed to progress from week one to week two, which is even tougher.

I didn't get past week one because I was highly skilled or because challenge one was easy. It was because I was able to learn faster and adapt to any situation I encountered.

I had to write blogs every day and work on the given feedback. Sometimes it was very difficult to manage because I had to learn first before working on the feedback. This was particularly challenging in the JavaScript part.

Week two is more challenging than week one as we are building upon what we did in the previous week. There is more work and more learning involved. Tasks that are supposed to be easy, like configuring or setting up the development and deployment environment, take time and can be quite challenging. It is possible to spend the whole day on them. The difficulty also depends on your level of experience. As a first-timer, it became the most challenging thing for me at the Bootcamp.

If there's one thing I've learned, it's that working alone at the Bootcamp is almost impossible, unreliable, and not recommended. Collaboration and asking for help are what helped me reach this stage of the Bootcamp. I highly recommend it to anyone who joins the Bootcamp, as well as to those interested in Andela in general.
How exactly do Follow Weights funtion?
Tags: meta, newbie
Published: 2019-12-04 21:33:45

<p> So I'm pretty new to the DEV.to community and I'm just interested in umderstanding Follow Weights. More specifically I'd like to know what negative "anti-Follows" do. I gave a particular tag a negative value but it seems to still be appearing on my feed. Additionally, I'd like to know if a value of "1.0" is considered the neutral value, or if "0.0" is the neutral value. Also, do decimal values in-between 0 and 1 have a special effect? Thanks!</p>
C-Basics: Ex3
Tags: replit, c
Published: 2019-12-04 21:28:07

3. Write a C program to print a block F using hash (#), where the F has a height of six characters and width of five and four characters. And also to print a big 'C'.
<p>
F<br />
C<br />
</p>
{% replit @MathPurpose/Ex3 %}
Looking for an alternative
Published: 2019-12-04 21:25:16

Hello to my DEV community,
I have always wanted to be an App developer and had registered for many online courses in the quest of finding the correct tutorials. Meanwhile I kept reading articles about App development and I noticed something called "flutter", on further readings I came to know that flutter is more flexible in terms of platform and easier to learn than conventional methods. 
The constant efforts to find good sources for learning helped me discover a technique that helps me to develop an App for both Android and iOS at the same time. I feel that flutter will grow more than authentic Java and Kotlin based apps as they provide better functionalities.
The following is the link to my first attempt at flutter App development after
learning the basics:

https://github.com/vedantpople4/flutter_calculator
C-Basics: Ex1
Tags: replit, c
Published: 2019-12-04 20:46:45

1. Write a C program to print your name, date of birth. and mobile number.
Expected Output:

Name   : Alexandra Abramov  
DOB    : July 14, 1975  
Mobile : 99-9999999999


{% replit @MathPurpose/Ex1 %}
How to crawl DOM elements that have random names in React?
Tags: help, css, javascript, react
Published: 2019-12-04 20:24:19

Hi, can you help me with isolated scope in CSS. I am trying to crawl a website and it has random class names that change with every session. Could you suggest something..

I have seen something related to isolated scope of angular but don't know much, Can someone suggest me where i can dig..
///Thanks
Let's build Flawk.to - Week 8
Tags: javascript, react, showdev
Published: 2019-12-04 20:17:08

It has been a busy week! My 3rd son has been in hospital for heart issues, which the doctors are still diagnosing. So I have been working from the hospital when I can. Which means I haven't made a lot of progress on [Flawk.to](https://flawk.to) 😭. That being said, I did get authentication done (at least signing up) using Twitter, Github and Google!

This week I will be working on the backend code for creating a community! I have most, if not all, of the frontend code done. This stream will be focused on sending some emails and writing to the DB!

As with everything else Flawk.to I will be using NextJS, NodeJS and React!

Stream starts tonight at [9PM EST](https://in-my-tz.now.sh/t/32312c416d65726963612f546f726f6e746f) (click the link to see the time in your timezone) on [twitch](https://twitch.tv/ericadamski). [Follow me](https://twitter.com/zealigan) on twitter to stay up to date with Flawk.to's progress!

---

We have a [public roadmap](https://flawk.to/roadmap)! You can vote for features you want to see and submit your own feature requests!
Spot Separate Concerns Immediately
Tags: angular, typescript, javascript
Published: 2019-12-04 19:34:29

In accordance with [the SRP principal](https://www.google.com/search?q=srp+principle) we can train ourselves to recognize when to split out responsibilities while coding.

Take this example:

![SRP](https://thepracticaldev.s3.amazonaws.com/i/b8w7hn0gls66jf9b4wei.PNG)

Do you see any concern with respect to SRP? Why yes, what is the call to UpdateArray doing? Is updating an array related to setting the state of an object? The answer is no.

**Why?**
Updating an array has nothing to do with stetting an object state. If we leave that code in, then it's most likely not going to be re-usable. A subsequent specification stated, repeat the HTTP get until a certain state is seen, then stop. In this case, by adding the repeated responses to the array, the output looked like this:

![repeated](https://thepracticaldev.s3.amazonaws.com/i/sdxh5m8w954hadzeh8q2.PNG)
 

Each additional try was adding to the Array where, what needed to be done was each new response needed to replace the content. There's duplicate records in the array!

**The Fix**
Simply make a local array and return it.  This localizes the array and allows the consumer to deal with it and does not mix concerns.

JWP2019
FaunaDB: A Guide for Relational Users
Published: 2019-12-04 20:07:54

Author: Deba Chatterjee
Date: December 20, 2018
[Originally posted on the Fauna blog.](https://fauna.com/blog/faunadb-a-guide-for-relational-users)

-----

We are pleased to announce a new white paper to follow up on Fauna CEO Evan Weaver's recent modern history of NoSQL database solutions ([Back to the future with Relational NoSQL](https://www.infoq.com/articles/relational-nosql-fauna) published in [InfoQ](https://www.infoq.com/)). This new white paper is now available for download [here](https://www2.fauna.com/whitepaper-relationalusers).

The white paper first looks into [E. Codd's 12 rules](https://en.wikipedia.org/wiki/Codd%27s_12_rules) for relational databases and how they are applied in the context of commercial relational databases today. The paper then dives into how relational databases became increasingly insufficient as the internet was adopted from academic to commercial purposes.

The deluge of data led to the need for a horizontal scale that the relational databases failed to provide. This ushered in the era of NoSQL databases that for the last decade or so has outpaced the adoption of relational systems.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/g0hqdo7645wmpmzmorl7.png)

However, wider adoption of NoSQL across mission-critical systems has been limited for a variety of reasons, such as inefficient operational readiness and lack of support for transactions. When it comes to capturing transactions in a billing or a reservation system, enterprises still rely on relational databases even though they are fully aware of the shortcomings in the technology.

**So what should the modern day database look like?** 

The answer may be different depending on who you ask. But they are all looking for a single solution to their problems.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/8r4wi182461r6rhzufkm.png)

We need a database product that marries the best of relational and NoSQL solutions in the same system. We need strongly consistent transactions in globally distributed systems.

The white paper then briefly examines some of the features that take FaunaDB closer to relational systems on top of a very strong NoSQL foundation. It concludes with a technical example explaining how to map a well-known relational model (the emp & dept tables in the SCOTT schema found in Oracle databases) into FaunaDB.

It is meant to be an easy read explaining how FaunaDB is bringing the best of both relational and NoSQL to the same place.

Download it [here](https://www2.fauna.com/whitepaper-relationalusers).
Creating Availability Sets for Virtual Machines in Azure with PowerShell
Tags: azure, powershell
Published: 2019-12-04 20:07:10

### Create a Resource Group

```
$splat = @{
    Name = 'availabilitySet-rg'
    Location = 'CentralUS'
}

New-AzResourceGroup @splat
```

### Create a Managed Availability Set

```
$splat = @{
    Location = "CentralUS"
    Name = "availabilitySetPractice"
    ResourceGroupName = "availabilitySet-rg"
    Sku = "aligned"
    PlatformFaultDomainCount = 2
    PlatformUpdateDomainCount = 2
}

New-AzAvailabilitySet @splat
```

Important notes: 
* SKU aligned means it uses managed disk. 
* Fault Domain max is 3 (currently & depends on region)
* Update Domain max is 20 (currently)
* Availability sets are under a 99.95% Azure SLA.


### Create Virtual Machines in an Availability Set

```
$cred = Get-Credential

1..2 | ForEach-Object -Parallel {
    New-AzVm `
        -ResourceGroupName "availabilitySet-rg" `
        -Name "myVM$_" `
        -Location "CentralUS" `
        -VirtualNetworkName "vNet" `
        -SubnetName "Subnet" `
        -SecurityGroupName "NSG" `
        -PublicIpAddressName "publicIpAddress$_" `
        -AvailabilitySetName "availabilitySetPractice" `
        -Credential $using:cred `
}
```

### Delete Resources Clean-up

```
Remove-AzResourceGroup -Name 'availabilitySet-rg'
```



### Sources

[Tutorial: Create and deploy highly available virtual machines with Azure PowerShell](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/tutorial-availability-sets)

[Manage the availability of Windows virtual machines in Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/manage-availability)
Pro Pythonist Way to Share Files :)
Tags: python
Published: 2019-12-04 20:03:53

Hello everyone ever Want to share files in your office work-space but don't have pendrive here it is python tip 

1)Start a python server from the directory you want to share file.
python -m http.server

2)Now, go to your system's browser on http://localhost:8000, Voila! you'll see the list of files, which you can share to another computer, but how? 


Step 1: Get your system's IP address. (use ifconfig in Ubuntu command line and ipconfig in Windows command prompt)


Step 2: Go to the following link having the format http://<ip_address_of_host_computer>:8000 on the device you want to download file


e.g. if IP address is 192.168.0.114, go to https://192.168.0.114:8000 and you'll find the same list of files. You can download them (or play media) by simply clicking on them.
Note: This works only if both the computers/mobiles/etc. are connected to the same network i.e. if you're connected to the same WiFi or same hotspot.

Read more https://docs.python.org/3/library/http.server.html
Github Pages??
Tags: codenewbie, github, webdesign, webdev
Published: 2019-12-04 19:59:00

Did you know that GitHub has this thing called "GitHub Pages"? I had heard about it in passing before but recently heard about it again from my coding bootcamp as a resources to post a website. I like this idea. I am already using GitHub as a source to hold code in general so why not a website about the code I am working on, right?

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/e5gei9hgrpwe10nasoo5.png)

# Getting Started
So, getting started was a bit confusing for me because I had not worked on GitHub in a while.
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/0vsh10rvacgq9a1189x6.png)
Clearly my GitHub green boxes are lacking but that is about to change.

It is really as simple as creating a repository with your username and "github.io" like "username.github.io". I didn't do anything specific outside of this. I didn't even create a README originally just to see how it worked, but added one later.

Once the page is setup you just clone it to your computer with the standard ```git clone https://github.com/username/username.github.io``` and then create an index page. I did mine in the terminal via these two commands :
```cd username.github.io
echo "Hello World" > index.html```

Once the page is in your folder via the next 3 commands:
``` git add --all
git commit -m "Initial commit"
git push -u origin master```


# I Had issues here....
For me this didn't quite go as smoothly on my computer side of things... I ended up going I ended up needing to do a few more commands on my computer. 
I had to remotely add the origin via ```git remote add origin git@github.com:caffiendkitten/caffiendkitten.github.io.git``` and that worked enough for me. I was then able to open it up in my VSCode and start coding.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/o7f18oiy5wqpbxv2r4e4.png)

And here is 
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/1k3971nu676l9bxtrg8b.png)
Now it's time to start working on things and uploading information.

# NOTE:: The time between pushing code and the site updating is a bit laggy so be patient with it. 

<hr>

Happy Hacking
![](https://media.giphy.com/media/l3vRmVv5P01I5NDAA/giphy.gif)

#### References 
1. https://pages.github.com/


###### Please Note that I am still learning. If something that I have stated is incorrect please let me know. I would love to learn more about what I may not understand fully.