teleren/devto huggingface dataset:
What is a Render Prop? 
Tags: react, renderprops, javascript
Published: 2018-10-24 07:44:04

---
title: What is a Render Prop? 
published: true
description: Learn a bit about render props.
tags: react, render props, javascript
---
*This is from my React newsletter, you can subscribe [here](https://www.getdrip.com/forms/669497779/submissions/new)*



### What is a render prop and why should you care?

It's funny, I have actually been using render props since sometime in 2016, but I didn't know that was uncommon. I actually thought it was just a normal thing everyone did in React. I was calling them "Component Props" when teaching them to my team back then. And thats because that is essentially all they are. A component passed in as a prop. They might seem more confusing then that, but thats just the arrow syntax playing tricks on you. Let me demonstate. 

```
const SimpleComp = data => <h2>{data}</h2>;
const CompWithRenderProp = ({ RenderProp }) => (
  <div>
    <h1>Hey You!</h1>
    {RenderProp("from Comp")}
  </div>
);
const App = () => {
  return (
    <div className="App">
      <CompWithRenderProp RenderProp={SimpleComp} />
    </div>
  );
};
```

Now you may be thinking "When would I ever want to do that". Well render props can be used in place of _any_ higher order component. That's right, literally every higher order component *can* be written with render props instead!

I think that is really cool because I don't really like writing higher order components. I find them confusing to be frank, where render props come very natural to me. 

I often use this pattern for things like modals. I pass a `close` function to the component so I can choose to close it via an "X" or a "Cancel" button or after submitting without duplicating "close" logic. 

A common way of using render props is by taking advantage of the children prop. We could have written the above code like so.

```
const CompWithRenderProp = ({ children }) => (
  <div>
    <h1>Hey You!</h1>
    {children("from Comp")}
  </div>
);
const App = () => {
  return (
    <div className="App">
      <CompWithRenderProp >
      {data => <h2>{data}</h2>}
      </CompWithRenderProp>
    </div>
  );
};
```



### Weekly take-aways
  1. Every higher order component can be re-created using render props.
  2. Render props are just components passed as a prop. 

Subscribe to my newsletter for more content like this.
[Newsletter](https://www.getdrip.com/forms/669497779/submissions/new)
Building a community of expert Engineers // Flint
Tags: consulting, career
Published: 2018-10-22 13:44:21

---
title: Building a community of expert Engineers // Flint
published: true
description: true
tags: Consulting, career
---

Hi **Dev.To** Community, 

Just wanted to let you know I'm launching a new Tech Consulting company.

The idea is to focus on creating a unique and engaging **Community** of Tech people, around the World.
Humbly starting in Montpellier South of France and then growing to several dynamic Tech ecosystems (like London, Berlin, Amsterdam etc.) and also the USA.

As an ex software engineer, I tried -with the help and feedbacks from several junior and senior Tech/Software engineers- to list **what engineers do really need** in terms of :
- belonging feeling
- self-fulfillment
- community and interactions with peers
- constant learning
- strong Values
- etc.

Should you want to know more : Here's [Flint website](https://flint.sh/en)

Feedbacks warmly welcome, as well as Shares / Applause (no rotten 🍅 please 😀 ) / Recommendations / Noise / Fork 🤔

👊🏻
Pierre
Founder and CEO, Flint
CodeTip - Ruby: Provide ways to iterate over collections
Tags: ruby, iterate, codetip
Published: 2018-10-24 06:43:09

---
title: CodeTip - Ruby: Provide ways to iterate over collections
published: true
description: How to provide iterators to Ruby collections
tags: ruby, iterate, codetip
---

Sometimes we have classes that represent collections, for example a class Group can represent a collection of members

```ruby
class Group
  def initialize(members)
    @members = members.dup
  end
end
```

When we want to iterate over the collection’s members we have to expose them through `attr_reader`

```ruby
class Group
  attr_reader :members
 
  def initialize(members)
    @members = members.dup
  end
end
 
group1 = Group.new(["Nick", "Ana", "Petros"])
 
group1.members.each { |x| p |x| }
```

The problem with this approach is that the consumers of our collection have to know that we named our variable “members” and use it to iterate. If we ever rename this variable, the consumers of our collection have to rename their call as well. Moreover, we can’t control the order of the enumeration. What can we do to fix that?

We can make our collection an Enumerable, and define an “each” method


```ruby
class Group
  include Enumerable
 
  def initialize(members)
    @members = members.dup
  end
 
  def iterate_members_alphabeticaly
    ite = @members.dup.sort
    while k = ite.shift()
      yield k
    end
  end
 
  def iterate_members_by_name_length
    ite = @members.dup.sort_by { |x| x.size }
    while k = ite.shift()
      yield k
    end
  end
 
  def each(&block)
    enum_for(:iterate_members_by_name_length).each(&block)
  end
end
 
 
group1 = Group.new(["Nick", "Petros", "Ana"])
 
group1.each {|x| p x }
```

That way we don’t expose the name of the variable and we can control the order of the enumeration, e.g. in the previous example we can change the `:iterate_members_by_name_length` with `:iterate_members_alphabeticaly`

```ruby
def each(&block)
  enum_for(:iterate_members_by_name_length).each(&block)
end
```
4 Amazing Ways To Animate Your Website
Tags: webdesigncompany, sgwebdesigner, websitedesigner, singaporewebdesigner
Published: 2018-10-24 06:25:36

---
title: 4 Amazing Ways To Animate Your Website
published: true
description: Here are 4 amazing ways to animate your website  
tags: web design company, sg web designer, website designer, Singapore web designer
---
Once upon a time, the animation was an element used solely in the field of entertainment. While it was delightful seeing animated characters on screens, and indulge in stellar 3D movies, someone decided to implement the same technology in a website! Animating your website might sound like a ridiculous idea, but the results are tremendous. People have moved on from enjoying static sites to interactive ones. Besides, the law of nature is that a moving object catches a person's attention better and faster than a dormant one. With animations incorporated in your site, visitors will feel more involved and thereby the conversion rate will go up!

![Website Design Company in Singapore](https://thepracticaldev.s3.amazonaws.com/i/xsoub4lqyzj40ljh3kym.jpg)

Here are 4 Amazing Ways to Animate your Website: 

**1) Providing Animated Guides:** When on a website, not every user will know their way around. Depending on how complicated the site is, and the number of features it houses, there can be ample confusion in the visitor's mind. By placing navigational animations, you can guide your users around the various aspects of your website. Not only does this make the user experience better, it indirectly prompts them to participate in the respective action.

**2) Advertise Information:** When a website has too many elements, a user is bound to lose focus. From buttons on the top, user panels, and what not! Amidst all this, you might seek to capture a user's attention at a particular point. With a neat animation in place, you can drive the visitor's attention to where you want to!

**3) Animate Loading Processes:** Instead of having a static message that says "loading", inserting an animation that displays the percentage or the status of an action will work much better. The former has the potential to drive away customers, and the latter will retain their much-needed attention!

**4) Tell Your Story:** Most websites have something they want to convey to a user. Some do it through "About us"; this is a really good way of reaching a user on a personal level, building trust, while also motivating them with your story. Having a small animation that shows that you are and what built you will go a tremendously long way.

A business website design is what your venture needs! With the expert, Openwave, by your side, your website will be miles ahead of others'. Call us today, and hire our [professional website designers] (https://www.openwavecomp.com.sg/web_design.html). We will transform your site into a compelling masterpiece that will leave the users glued!
The Emperor's New Clothes
Tags: rant, mvp
Published: 2018-10-24 05:47:21

---
title: The Emperor's New Clothes
published: true
cover_image: https://thepracticaldev.s3.amazonaws.com/i/qc35bleamwhlvwi963qw.JPG
description: A story about bad software and people praising it
tags: rant, mvp
---

During the last months I had to work with a new e-commerce solution, which is *not* worthy of the name. And I really mean it. I have worked with a couple of e-commerce solutions during the last years. Some of them were really cool, some were less cool. The one, that I'm working with right now, is just bad.

## Developers complain all the time...

... and I know they do. I do it as well. But most of the time this isn't really in a serious way. Sometimes it is just to be funny, sometimes it's just to talk.

But once more: this time, my complain is real. It's sincere. It's from the bottom of my heart.

But interestingly, this post is not about the before mentioned e-commerce solution. It's about something else.

But to understand my point, let me tell you why I dislike the product.

## Why do I dislike the product?

I hope I can keep this section short, as there is so much stuff to complain about.


### VAT calculation 

Let's start with the VAT calculation. Out of the box, this "shop" only supports one global tax rate. Have you heard me? *One single* tax rate. Which shop gets along using a single tax rate? Depending on your products you couldn't even run a a shop just for Germany, as we have two different tax rates here. Not to mention an international shop. Why would anybody buy an e-commerce solution where you have to do the VAT calculation on your own?

### Shipping costs

The administrators *cannot* log into the backend and change the shipping fees. To change the fees for your shipping methods, you have to

* open a JSON file
* find the lines where your shipping fees are specified
* change the shipping fees
* open Postman (yes, Postman is a must-have tool if you use this product)
* Bootstrap the system by sending a request to a specific endpoint

Nice and easy process, isn't it?

### And so much more...

But I will stop complaining now and get to my main point. Finally. ;-)

## There will be bad software...

... and that's ok. To be fair, at some point I wrote bad software myself. 

My problem is, that the emperor is naked but there are people praising his beautiful clothes. (Finally there is the reference to "The Emperor's New Clothes").
And here is what I mean: If you google (or bing) this e-commerce solution, you will find **a lot** of blog posts and other stuff about it, where people are telling you how great it is. And of course, some of them are awarded with an MVP (Most Valuable Professional) award by the software vendor. I wasn't able to find a single blog post saying "Creating products is nice and easy, but the tax calculation is a nightmare".

My point is: If a software (or any other product) is not good, that's totally ok. Maybe, if it is open source, you can even help to improve it and it might be awesome someday. But as long as it is bad, please don't tell everybody that it is awesome.
Quick Google search from terminal
Tags: productivity, terminal, google
Published: 2018-10-24 05:38:44

---
title: Quick Google search from terminal
published: true
description: 
tags: productivity, terminal, google
---

Note: this only applies to MacOS

Often times while I'm working on a project, I'll need to search for something on the internet to solve a problem. I usually use the search engine created by Google, called Google. When I need to search for something, I always have to stop what I'm doing, and switch over to a browser to type in my search. This may not seem like a big deal because it doesn't take that much time, but in reality this is a context switch. There is a momentary discontinuity in the intentions of your search.

I'd like to remove this obstacle and be able to search without leaving my development environment. This can be accomplished by using the `open` command on MacOS, and the `chromium-browser` command on Linux.

Place this script in your PATH with the name "gsearch":

~/scripts/gsearch
```

#!/bin/sh

# If using mac
open "https://google.com/search?q=$*"

# If using linux and chromium
chromium-browser "https://google.com/search?q=$*"


# Now you can enter a search query like this:
gsearch please help google
```


![hey](https://thepracticaldev.s3.amazonaws.com/i/qo5vfi5nai81ctzyfx9a.png)

A browser tab will then come into focus, showing the results for a Google search of "please help google". Now that's good DX.
Improving writing skills
Tags: discuss, help
Published: 2018-10-24 05:08:39

---
title: Improving writing skills
published: true
description: 
tags: #discuss #help
---
I have been in the workforce for almost 5 years and I have trouble writing concise, to-the-point emails. I feel like I do a good job explaining things clearly when I talk to someone, but when it comes to putting my thoughts into words, I fall short. This is one of the reasons why I'm reluctant to share my thoughts through blog posts/articles. 

Has this happened to anyone? If so, what steps did you take to improve your writing skills?
Send GET requests to API with Powershell
Tags: powershell, api, windows, sysadmin
Published: 2020-09-12 10:15:41

---
title: Send GET requests to API with Powershell
published: true
date: 2018-10-24 00:00:00 UTC
tags: [powershell, api, windows, sysadmin] 
canonical_url: https://mrpowerscripts.com/rest-api-powershell/
---

When I started learning Powershell web technologies were mostly a mystery for me. I was a simple systems admin trying to make my life easier by automating things. Sure, I knew how to create a basic HTML site with some CSS, but even javascript was well beyond my understanding. Though over time I developed an interest in developing for the web, which spurred me to learn how Powershell can interact with things beyond my computer or local network. 

[GET Request with Powershell tutorial video](https://www.youtube.com/watch?v=7mEmQgGowMY)

How can I scrape a website with Powershell? How can I access an API? How can I send data from my computer to services on the web? I had so many questions for a long time.

[POST Request with Powershell tutorial video](https://www.youtube.com/watch?v=9piyM38it_8)

I discovered the concept of an API and found it absolutely amazing. Having a standard way for different computers with different operating systems running different programs build with different code sounded so cool. I don’t need a browser to interact with this website? That’s amazing! Think of all the automation possibilities!

Eventually, I found out about RESTful or a REST API design. Through the process of learning about REST APIs, I discovered the JSON data format. As someone who had to work a lot with verbose XML files for configuration data and data transfer, it looked like an amazing alternative. Once I learned a bit more about what a REST API is and how to format data as JSON it opened up this new world of communicating with other systems through the web.

I was able to use Invoke-WebRequest in Powershell to GET or POST data from various API resources. I looked around for all kinds of APIs on the internet to see what I could do with them. That encouraged me to learn how to make my own API interfaces. Which I eventually managed to do using tools like Flask with Python and ExpressJS with NodeJS.

The Powershell cmdlet Invoke-WebRequest automatically turned JSON objects from GET requests into Powershell Objects which made it super easy to inspect and play around with the data from the command line. Making it super easy to test and play around with the data I was passing through the APIs I made.

Eventually, request tools like Postman and Insomnia became popular, and I generally steered away from using Windows while developing. When all of my web work started though Powershell was there to help me along, and I still think it’s a really great tool for quickly scripting and working with data at the command line. Objects are awesome.

I’ve linked above the two videos I made about using Invoke-WebRequest to make Get and Post requests. Those two are all you need to get started with the fun world of APIs and web automation with Powershell. Happy scripting!
Got Any Advice for Early-Career Programmers?
Tags: help, beginners, career
Published: 2018-10-23 21:57:20

I'm in my first full-time coding position post grad school and I've been here about a year. My three-pronged career strategy is, at the moment:

1. **Build a personal brand.** I've got a [Twitter](https://twitter.com/_awwsmm), dev.to, [LinkedIn](http://linkedin.com/in/awwsmm), [GitHub](https://github.com/awwsmm), and website with the handle `awwsmm`. I'm posting more here and on Twitter. I'm trying to get my name out.

2. **Get certified.** I don't have a degree in C.S., so I'm trying to add some "legitimacy" to my CV by taking a [course in advanced Java](https://www.ibat.ie/courses/advanced-java-programming-course.html) and getting [Oracle certified](https://education.oracle.com/java-se-8-programmer-ii/pexam_1Z0-809). After that, I'm thinking of getting certified in SQL or [Apache Hadoop/ Spark](https://www.cloudera.com/more/training/certification.html).

3. **Build a portfolio.** I did a ton of C/C++ coding in graduate school, but unfortunately I didn't keep a record of much of it at all. I'm trying to document more of my recent work here and on GitHub.

**If you're also new**, what challenges have you faced early on? Have you gotten any really good advice from more senior developers? Why did you choose your particular language or framework?

**If you're more experienced**, what advice do you have for me? What languages are worth learning now? How important are certifications? What do you look for when hiring new developers? What do you think of my approach?

Any advice at all would be appreciated!
What are some signs that your project at work is ending?
Tags: discuss, career, work
Published: 2018-10-23 21:55:35

---
title: What are some signs that your project at work is ending?
published: true
description: How to know you're about to be reassigned
cover_image: https://images.unsplash.com/photo-1508083921717-fcbb127f78e1?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=95050269eec9fb070d3033172f344dac&auto=format&fit=crop&w=1952&q=80
tags: discuss, career, work
---

I've been on multiple projects at my current workplace and am wondering if other people have the same signs that a project is sunsetting. Note: I'm not a lead, so I'm one of the ones that only officially knows day-of that I'm being reassigned. 

Common themes from my past projects:

* The PM gets another team and blows off your meetings in favor of theirs
    * Possibly includes other shared services style people like scrum masters, lawyers, marketing, customer service types, that sort of thing
* Recurring meetings are updated regularly to extend the end date another month
* The pressure to have a fleshed out backlog of work eases up
    * Note: you must still maintain the appearance of a backlog to not make the grunts suspicious
    * Whether or not things are fully vetted (and whether or not anyone higher up cares) before being marked ready is the larger indicator
* (on a ridiculously large team) Multiple people are being spun off in waves

And my possible one from today which prompted this post: One-off events that are taking time away from engineering are not to be rescheduled for after the release because of Reasons. Or maybe I'm just being paranoid.


People who have been through multiple reassignments or project ends, what have you noticed as a trend?
Quick XCode Editing Tip
Tags: xcode, ios, swift
Published: 2018-10-23 21:44:54

---
title: Quick XCode Editing Tip
published: true
description: Save time switching from storyboards to code.
cover_image: https://thepracticaldev.s3.amazonaws.com/i/6zrgasoy3rcby6c2zy79.png
tags: xcode, ios, swift
---
One of the biggest issues people have with XCode is that storyboards can take long to load over time (there are ways to fix it but that's for another day). When you switch back and forth between storyboards and controllers the loading time can get quite painful. 

Some people open the assistant editor and edit the corresponding file in the tiny little window below. It can get annoying trying to constantly resize it.

It gets even worse when the debug window opens up. 

![No space](https://thepracticaldev.s3.amazonaws.com/i/5tscddcxnpq03n8ln0na.png)

Here is a tip that I accidentally stumbled upon the other day. I was trying to open a new tab in Chrome using the shortcut Command+T and didn't realize I was still in XCode. I didn't know that XCode supports tabbed windows! 

![Command Tab View](https://thepracticaldev.s3.amazonaws.com/i/6zrgasoy3rcby6c2zy79.png)

You can open your storyboard once and close all the windows for more space and then you don't have to worry about opening it again and waiting forever! Look at all that space you gain!

![So much real estate](https://thepracticaldev.s3.amazonaws.com/i/9ygf1qw41uqj2vx8znub.png)
Install the Linode CLI on Linux via Snap
Tags: linode, linodecli
Published: 2018-10-23 21:38:33

---
title: "Install the Linode CLI on Linux via Snap"
description: "If you run a Linux distribution (distro) and you want to install the brand new Linode CLI, here's an easy and safe way to do so via a snap package."
published: true
tags: "linode,linode-cli"
canonical_url: "https://www.feliciano.tech/blog/install-linode-cli-on-linux-via-snap/"
---

If you run a Linux distribution (distro) and you want to install the brand new Linode CLI, here's an easy and safe way to do so via a snap package.

Back in 2017 Linode [announced their new v4 API][linode-api-post].
This new API (still in development I believe) puts the old one to shame.
It's much more "RESTful" than the old one and enables many more features that the old one simply didn't have.

Building on the shoulders of the new API came the new [Linode Developer Website][linode-dev-site], the new [Linode Manager Preview][linodians-manager-preview] available at <https://cloud.linode.com>, and of course, the new Linode CLI.

The new Linode CLI, written in Python, is very useful.
Its features and how to use them are detailed via [Linode Docs][docs].
While it can be installed via `pip`, if you don't already have `pip` installed or want a more secure way to run the CLI, you can install it via a snap.

You can install the `linode-cli` via snap for Ubuntu 16.04, Ubuntu 18.04+, elementary OS 5, Debian 9+, Fedora 28+, and more:

```bash
sudo snap install linode-cli
```

As with all snaps, it will be auto-updated and sandboxed from the rest of your system meaning secure.
More information on why you should be using snaps [here][why-snaps].


The source for this snap can be found [here][gh-linode-cli-snap] while the source for Linode's CLI itself can be found [here][gh-linode-cli].



[linode-api-post]: https://www.linode.com/community/questions/11221/linode-rest-api-v4-early-access
[linode-dev-site]: https://developers.linode.com/
[linodians-manager-preview]: https://linodians.com/blog/new-linode-manager-preview/
[docs]: https://www.linode.com/docs/platform/api/using-the-linode-cli/
[why-snaps]: https://www.fossmint.com/what-are-ubuntu-snaps-and-how-are-they-important/
[gh-linode-cli-snap]: https://github.com/felicianotech/linode-cli-snap
[gh-linode-cli]: https://github.com/linode/linode-cli