teleren/devto huggingface dataset:
Daily Challenge #213 - Are they the "same"?
Tags: challenge
Published: 2020-03-26 13:00:24

---
title: Daily Challenge #213 - Are they the "same"?
published: true
series: Daily Challenge
description: Implement a function to check if two arrays are the "same". 
tags: challenge
---
Given two arrays `a` and `b` write a function comp(a, b) (compSame(a, b) in Clojure) that checks whether the two arrays have the "same" elements, with the same multiplicities. "Same" means, here, that the elements in `b` are the elements in `a` squared, regardless of the order.

Examples
Valid arrays
`a = [121, 144, 19, 161, 19, 144, 19, 11]  `
`b = [121, 14641, 20736, 361, 25921, 361, 20736, 361]`
`comp(a, b)` returns true because in `b` 121 is the square of 11, 14641 is the square of 121, 20736 the square of 144, 361 the square of 19, 25921 the square of 161, and so on. It gets obvious if we write `b`'s elements in terms of squares:

`a = [121, 144, 19, 161, 19, 144, 19, 11] `
`b = [11*11, 121*121, 144*144, 19*19, 161*161, 19*19, 144*144, 19*19]`
Invalid arrays
If we change the first number to something else, `comp` may not return true anymore:

`a = [121, 144, 19, 161, 19, 144, 19, 11]`
`b = [132, 14641, 20736, 361, 25921, 361, 20736, 361]`
`comp(a,b)` returns false because in `b` 132 is not the square of any number of `a`.

`a = [121, 144, 19, 161, 19, 144, 19, 11]`
`b = [121, 14641, 20736, 36100, 25921, 361, 20736, 361]`
`comp(a,b)` returns false because in `b` 36100 is not the square of any number of `a`.

Remarks
`a` or `b` might be [] (all languages except R, Shell). a or b might be nil or null or None or nothing (except in Haskell, Elixir, C++, Rust, R, Shell, PureScript).

If `a` or `b` are nil (or null or None), the problem doesn't make sense so return false. If `a` or `b` are empty then the result is self-evident.

###Tests
a1 = [121, 144, 19, 161, 19, 144, 19, 11]
a2 = [11*11, 121*121, 144*144, 19*19, 161*161, 19*19, 144*144, 19*19]

Have fun!
***
_This [challenge](https://www.codewars.com/kata/550498447451fbbd7600041c) comes from g964 on CodeWars. Thank you to [CodeWars](<https://codewars.com/>), who has licensed redistribution of this challenge under the [2-Clause BSD License](<https://opensource.org/licenses/BSD-2-Clause>)!_

_Want to propose a challenge idea for a future post?  Email **yo+challenge@dev.to** with your suggestions!_
Principles for growth as an engineer
Tags: todayilearned, career, beginners
Published: 2020-03-26 13:00:23

*TL;DR notes from articles I read today.*

### [Principles for growth as an engineer](https://bit.ly/2WK3Our)

- Understand how your work is valuable to your company and make decisions that support quality, feature-richness, and speed.
- If you find your path blocked, find a way forward by persuasion, escalation or technical creativity.
- Think about what needs doing beyond your immediate task. Advocate for what the company or team mission can benefit from.
- Write crisply and concisely to not just inform, but persuade and teach.
- Understand dependencies, ensure key components have owners, summarize plans and status, and proactively inform stakeholders of progress (including obstacles).
- Own your education and pursue constant growth. Make learning a daily task.
- Master your tools: Mastering the editor, debugger, compiler, IDE, database, network tools, and Unix commands increases your development speed.
- Communicate proactively, regularly and in an organized way to earn collaborators’ confidence and goodwill.
- Find opportunities to collaborate, especially on cross-functional projects, to grow in terms of visibility and skills.
- Be professional and reliable: come to meetings prepared and on time, and pay attention. Deliver what you promise or proactively communicate if things go wrong. Disagree respectfully and show your colleagues appreciation. Avoid complaining and help people stay upbeat.

*[Full post here](https://bit.ly/2WK3Our), 4 mins read*

---

### [How to be a good software engineer mentor](https://bit.ly/2WLSHB0)

- As a mid-level or senior developer helping a junior developer grow, show them things they can only get from experience, not just coding. 
- Explain business-side decision making. Have your junior sit in on meetings with clients or production managers (or explain later), so they have context and understand where their tasks come from. 
- Do a demo and discuss the business logic of the project they are working on, so they can see the user perspective and know why certain decisions were made.
- Cover best practices in code reviews: discuss better solutions if they have poorly written code even if it works. Decode jargon, especially for core concepts, and explain the team’s code decisions so they can see how applications grow.
- Hear them out before you tell them the ‘right’ way. Resist rushing them towards the end of a sprint and let them learn to think fast and critically and to commit to decisions. Listen and then explain why (if) you need to make a different choice.
- Talk them through your thought process while coding, then reverse roles: hearing them think lets you notice when they aren’t using a concept correctly and makes them more aware of their own process.

*[Full post here](https://bit.ly/2WLSHB0), 5 mins read*

---

*[Get these notes directly in your inbox every weekday by signing up for my newsletter, in.snippets().](https://mailchi.mp/appsmith/insnippets?utm_source=devto&utm_medium=post08&utm_campaign=is)*
Daily Developer Jokes - Thursday, Mar 26, 2020
Tags: jokes, dailydeveloperjokes
Published: 2020-03-26 13:00:17

---
title: "Daily Developer Jokes - Thursday, Mar 26, 2020"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
cover_image: "https://private.xtrp.io/projects/DailyDeveloperJokes/thumbnail_generator/?date=Thursday%2C%20Mar%2026%2C%202020"
published: true
tags: #jokes, #dailydeveloperjokes
---

Generated by Daily Developer Jokes, a project by [Fred Adams](https://xtrp.io/) ([@xtrp](https://dev.to/xtrp) on DEV)

___Read about Daily Developer Jokes on [this blog post](https://xtrp.io/blog/2020/01/12/daily-jokes-bot-release/), and check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/).___
### Today's Joke is...
![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e1259b02befe.png)

---
*Have a joke idea for a future post? Email ___[xtrp@xtrp.io](mailto:xtrp@xtrp.io)___ with your suggestions!*

*This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit.*

<!-- 
Joke text:
___Q___: Why did the functional programmer finally move out of their house?

___A___: For(e) closure
 -->
Best sources(Free) to learn or start some programming languages during corona outbreak.
Tags: learning, beginners, develop
Published: 2020-03-26 12:57:57

   1. JavaScript
       
        Today,s web language yes you heard it right JS or javascript, no good    
        website is complete without javascript some goodresources for learning 
        javascript
          1. FreeCodeCamp by quincy larson(best)
          2. MDN Docs for javascript or javascript.info
          3. Then a good book for clearing out some topic.
         and read articles for some specific topics to make a good grasp of some 
         important topics.

   2. Java
     
        I think there are plenty of good resources out there on internet for 
        learning java some of them from which i have learned are
           1. java by navin reddy* - youtube
           2. JAVA: the complete reference by herbert schildt*. 
           3. JAVATPOINT 
           4. journal dev
           5. w3resource java excercises(they are topic wise)

   3. C#

           1. *KUDVENKAT* best to learn C# or .net framework from scratch             
           2. microsoft docs (little bit confusing)
           3. C-sharp corner

For improving your problem solving capabilities do more and more programing on paper first then on IDE and Find problems by dry runnning them not by compiling.
Netcastly - A podcast lovers place
Tags: podcast, webdev, react, showdev
Published: 2020-03-26 11:47:12

Hi all!

I wanted to share a quick update on what I have been working on and show you the great lengths we have made by our launch of https://netcastly.com/

Haven't seen it yet? Make sure to give us some love on twitter and producthunt!
Twitter: https://twitter.com/netcastly/
ProductHunt: https://www.producthunt.com/posts/netcastly-a-podcast-site

This web app gives creators and lovers of podcast full control! 
We have so far shipped the ability to upload your podcast as a creator and for lovers to like your podcast and listen to them! All while giving you analytics on how your podcast is performing. 

We have a lot on our laundry list of things to do but look forward to great feedback and hope you love the product.
C# - Jokenpo Challenge
Tags: csharp, begginer
Published: 2020-03-26 15:52:01

---
title: C# - Jokenpo Challenge
published: true
date: 2020-03-26 11:37:40 UTC
tags: 
- csharp
- begginer
canonical_url: http://luturol.github.io/csharp/CSharp-Jokenpo-Challenge
---

_You can check the [repository right here](https://github.com/luturol/jokenpo)._

## [Jokenpo Challenge](http://dojopuzzles.com/problemas/exibe/jokenpo/)

I like to solve problems and challenges, they make me feel excited about coding because I have to be on my best game and try to solve the problem is exciting . It gives that feel of accomplishment and victory when you finished.

The challenge consist of making a Jokenpo game logic, by all means, you must implement the rules of the game. Rock wins against Scissor and lose against Paper, Paper wins against Rock and lose against Scissor, Scissor wins against Paper and lose against Rock. How can we implement that in C#?

For this I thought that I must have some way of validation. The validation I wanted was to make it more “generic” and easy to create. Each validation only works for that one had form. To do it, I made an Enum for Hand forms:

```csharp
public enum HandForm
{
    Rock,
    Paper,
    Scissor
}

```

Now the problem is: _How to validate the Enum? How the Enum will have it’s own Rule?_

The way I thought of solving was: create an extension for this enum that will return the **Rule Class**.

```csharp
public static class HandFormExtensions
{
    public static AbstractRules ToRule(this HandForm handForm)
    {
        if (handForm == HandForm.Rock)
            return new RockRules();
        else if (handForm == HandForm.Paper)
            return new PaperRules();
        else if (handForm == HandForm.Scissor)
            return new ScissorRules();
        else
            throw new ArgumentException("There is no hand form rule for this option");
    }
}   

```

Rule class will implement the AbstractRule class that will contain an abstract method that returns the result of that play, this means that the Rule class will have the checks for that hand form against the opponent hand form.

```csharp
public abstract class AbstractRules
{
    public abstract GameResult WinAgainst(HandForm opponent);
}

```

Now the Judge of the Jokenpo will have only one line of code:

```csharp
public GameResult ValidateGame(Player player1, Player player2)
{
    return player1.HandForm.ToRule().WinAgainst(player2.HandForm);             
}

```

So, whenever someone call the Judge class to validate the game, it will only return the result of the game based on the first Player passed as Parameter.

That’s it folks. Don’t forget to eat clean and drink water.

Peace.
Multilogin best proxy service recommendations 
Tags: proxy, productivity, socialtools
Published: 2020-03-26 11:25:40


Multilogin is a productivity tool that helps users to use and control multiple accounts at the same time. All that with a click of a button. They also have a Youtube channel with 1000 subscribers, where you can find videos explaining all the basics you need to know, to use their tool.

Multilogin, as a management tool, masks all the fingerprints that could lead you to having your account suspended - screen size, operating system, and others that websites use to track and identify you. But ultimately, the biggest fingerprint of all is your IP address, so they are suggesting to use proxy services too.


But what is the current best proxy deal?
Multilogin suggests several proxy providers on their page, but there is a cheaper proxy provider with the same quality.
[Smartproxy](smartproxy.com) is currently on sale **with a discount code SMARTOFF**, that lets you get 20% off from any plan on their page.

![Proxy deal](https://dev-to-uploads.s3.amazonaws.com/i/qk3huyehvkac2j7bxxmx.png)

Why choose Smartproxy?
Smartproxy has over 10 million IP addresses that are going through real mobile and desktop proxy networks. They also offer unlimited connections and threads on top of that. You can choose country-level targeting and decide between using a random proxy that rotates your IP address with every request or sticky proxy, which would change your IP every 5 minutes. Their pricing model is based on subscription with data consumption limits, it is simple to understand and easy to work with.

What is a proxy?
A proxy is a server that acts like a gateway or intermediary between any device and the rest of the internet. A proxy accepts and forwards connection requests, then returns data for those requests. Proxies make up our websites, online services, and other networks. People use proxies for many things: most proxies can change your IP address, while others can protect large websites or simply authenticate public Wi-Fi users.
The only problem to solve is the one we have today
Tags: focus, productivity, principle, optimiziation
Published: 2020-03-26 10:41:51

---
title: The only problem to solve is the one we have today
published: true
description: I think it is a mistake to solve possible, future difficulties. Not catering for potential features today has the advantage of keeping the codebase more flexible. If you do not commit to a solution now, you'll have more wiggle room tomorrow. Keep your options open. 
tags: #focus #productivity #principle #optimiziation
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/9qfeglano6nh5w8glqmi.jpg
canonical_url: https://charlesagile.com/the-only-problem-to-solve-is-the-one-we-have-today
---

What you need to solve are the problems you have *now*: dedicate [proper focus](https://thekarel.gitbook.io/best-practices/the-big-picture/principles/attention) to these. Produce a correct solution for the task at hand and move on. 

Worrying about what might happen in an imaginary scenario leads you down into rabbit holes. It is one of the reasons why people start many things but finish few.

Another reason to refrain from "preemptive" solutions is the lack of information. You will know more about the problem domain later and will be able to come up with a better solution "just in time".

Finally, you limit your future choices by making sub-optimal decisions now. 

> Don't paint yourself into a corner by making uninformed judgments.

If you keep your application [as simple as possible](https://thekarel.gitbook.io/best-practices/the-big-picture/principles/simple), you'll have a much higher chance to adapt to future changes successfully. 

You can't predict the future, and surprises will happen. What you have planned might never arrive, something completely different probably will. 

Continue reading [The only problem to solve is the one we have today](https://thekarel.gitbook.io/best-practices/the-big-picture/principles/today) in [Best Practices](https://thekarel.gitbook.io/best-practices/)
How I Automated The Google Form Filling For My College Attendance Using Python
Tags: python, script, showdev, productivity
Published: 2020-03-26 10:07:13

To fight Corona Virus, our Prime Minister has declared lockdown for 21 days in all over the country. And so, our college decided to take online lectures and also, sent us a google form which is to be filled every day for each lecture to fill attendance. Filling form 4 times a day with the subject name and corresponding time and professor details is a tedious task. But also, Attendance is Engineer's Only Motivation to attend lectures. 

And So, I decided to use Python and to write a script to automate this tedious task.


As usual, I started by searching on google to see how can we submit the google form using python script. And I came to know that Every Google Form Input element has a "name" attribute attached to it and we can use it to send the data for the corresponding field.

So, I opened the google form in chrome and Started inspecting Input element in which I will be filling the data, and I found a bunch of _ss-form-entry_ objects with name attribute like `" name = entry.<id> "`

I copied every name attribute value of the field.

Now, In Python I created a dictionary with the value of name attributes that we copied from the browser as keys and the data that I want to fill in the corresponding field as it's value.

{% gist [https://gist.github.com/jamesshah/35a2c46ac328949ce8e3ac6599d35263](https://gist.github.com/jamesshah/35a2c46ac328949ce8e3ac6599d35263) %}

Then I created a dictionary with Day Name(Monday, Tuesday, etc.) as keys and the lectures' details as list as values.

{%gist [https://gist.github.com/jamesshah/2e5c0a5f3ad28e17ee0f220ef69a0717](https://gist.github.com/jamesshah/2e5c0a5f3ad28e17ee0f220ef69a0717)   %}

And put both the dictionaries in a function that returns the list of different data dictionaries of the current day.
{%gist [https://gist.github.com/jamesshah/c663f8bd56d9b851f209a4427ddd7dce](https://gist.github.com/jamesshah/c663f8bd56d9b851f209a4427ddd7dce) %}

And, finally the function for sending the form response using *POST* method of **requests** library.  It takes two arguments - URL and data(here, data_dictionary), respectively.

{%gist [https://gist.github.com/jamesshah/c9ad0743807aef2aeba88e5a947efe8d](https://gist.github.com/jamesshah/c9ad0743807aef2aeba88e5a947efe8d) %}

*Note*: Change the URL of google form by replacing '/viewform'  at the end of the URL with 'formResponse'. Now, your URL should look like this `https://docs.google.com/forms/d/<form_id>/formResponse`

And that's it, now I just have to run this script once a day and it will fill my attendance for all the lectures of that day. 
I can also deploy it on a server like [PythonAnyWhere](https://www.pythonanywhere.com/) or [DigitalOcean](https://www.digitalocean.com/) and it can run by itself every day, but as I'm home quarantine for the 21 Days, I have more than enough time to run it manually every day.🤓🤓

You can find the full code here : [AutoFill Google Form](https://github.com/jamesshah/GoogleForm-AutoFill)
Turn your Windows 10 Devices into Kiosks
Published: 2020-03-26 10:03:08

Configure your favorite Windows 10 laptops and desktops for business. Put
business apps and websites in [Windows 10 kiosk mode](https://scalefusion.com/windows-10-kiosk-mode) without hampering the user experience.

Configure business apps and settings on Windows 10 devices with Zero-touch. Devices are auto-enrolled into policy settings on first-boot by the end-users.

Scalefusion [Windows 10 Device Management Solution](https://scalefusion.com/windows-mdm-solution) is being used across different industry verticals.
Which online tools are you using to keep contact with your co-workers ?
Tags: discuss, covid19
Published: 2020-03-26 10:00:17

Hello DEV,

This is my very first post on DEV 🎉

I'm here to ask you which online tools are you using to keep contact with your co-workers ?
France is in quarantine and we had to almost fully switch to remote work across all our departments.
My department is organizing e-TGIFs (Thank's God It's Friday) to be able to talk about everything non-work related and exchange on how everyone adapted to quarantine life. We're currently using Google Meets, but it's hard to see everyone at once (we're ~40 simultaneously), that's why I'm asking which tools you are using. The main goal is to be able to see the most people possible at once, to socialize the most during this hard time.

Thank's in advance and stay safe ! ✌️
Using Heroku as a server for your static page
Tags: webdev, productivity, python, aws
Published: 2020-03-26 09:33:03

I have had a lot of people complain to me about not habing the proper resources like a domain name or a server to host a page, otherwise, they are confident they would have a million dollar poge. As ironical that sentence is in itself, this post is not about my people nagging me about not having a page, it's about how to not being one.

I feel like the only thing that make these people say things like that is because of them being not aware about the resources that are available for free and that can be used to do whatever they want. Yes, ofcourse, these free resources have their own disadvantages but then again, it's free.

Read the full article in my page [here](https://deepjyoti30.github.io/blog/Using-Heroku-as-a-server-for-your-static-page)
Your favourite Bitbucket features?
Tags: help, api, productivity
Published: 2020-03-26 09:31:32

I'm looking for some inspiration and I need your help to find it! I've been tasked with building some API wrappers for Bitbucket and I'm looking for your favourite features that could be used in an API call. Anything that streamlines your work and makes you sit back, relax and enjoy computers do their thing is perfect.