teleren/devto huggingface dataset:
Pipeline all the things: Redis performance boost at application level
Tags: redis, nosql, performance, showdev
Published: 2019-08-16 12:36:21

---
title: Pipeline all the things: Redis performance boost at application level
published: true
description: Learn how using Pipelining can speed up your Redis performance more than 10x
tags: redis, nosql, performance, showdev
series: Erika's Tutorial Notes
---

While researching for my [latest tutorial](https://www.digitalocean.com/community/tutorials/how-to-perform-redis-benchmark-tests) at [DigitalOcean](https://dev.to/digitalocean), I had the chance to play around with Redis and I've run all sorts of benchmark tests on a dozen of servers.

Something that was quite surprising to me was how many more requests per second your Redis server can handle if you just *pack* some commands together, in what is called **pipelining**. 

This happens because even though Redis is quite fast, a request consumes other resources from the system. It's like buying several single bread slices each wrapped in a package, instead of getting a full loaf.

A regular benchmark with the `redis-benchmark` tool would go like this:

```command
redis-benchmark -t get,set -q
```

```
SET: 95785.44 requests per second
GET: 97370.98 requests per second
```

Now this will simulate a pipeline of 16 commands:

```command
redis-benchmark -t get,set -q -P 16
```

```
SET: 877193.00 requests per second
GET: 1351351.38 requests per second
```

From **97,370.90** to **1,351,351.38** requests per second!!! 


![very fast](https://thepracticaldev.s3.amazonaws.com/i/ltwvfpxs10ml02f4gqon.gif)


This is an optimization that needs to happen at code level, just so we're clear. You can find more about pipelining with Redis in their [official documentation](https://redis.io/topics/pipelining). To give you an idea of how the code looks like, here's an actual Ruby code taken from that documentation, which makes a little benchmark test with and without pipelining:


```ruby
require 'rubygems'
require 'redis'

def bench(descr)
    start = Time.now
    yield
    puts "#{descr} #{Time.now-start} seconds"
end

def without_pipelining
    r = Redis.new
    10000.times {
        r.ping
    }
end

def with_pipelining
    r = Redis.new
    r.pipelined {
        10000.times {
            r.ping
        }
    }
end

bench("without pipelining") {
    without_pipelining
}
bench("with pipelining") {
    with_pipelining
}
```

And here is the output (also copied from their docs):

```
without pipelining 1.185238 seconds
with pipelining 0.250783 seconds
```

You can also make use of this feature in PHP with the [PHP Redis Client](https://github.com/cheprasov/php-redis-client) library.

Check the [Redis clients](https://redis.io/clients) page for clients supporting pipelining in other languages.

Cheers!
Trust me, I can build software because I learned how to code from ___
Tags: justforfun, game, fun, watercooler
Published: 2019-08-16 12:31:38

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

A: gifs
B: Twitter 🐥
C: BTS 👨‍🎤

Or suggest your own answer.
I coded for a year. Here are ten lessons
Tags: coding, productivity
Published: 2019-08-16 12:29:56

---
title: I coded for a year. Here are ten lessons
published: true
description: Streaks are good, especially if you love it.
tags: coding, productivity
cover_image: https://cdn.olai.in/jjude/one-year-coding.jpg
---

_Read the full article at my [site](https://www.jjude.com/one-year-coding/)_

I coded daily for a year. I skipped when we went on holidays and Sundays. Even when I skipped, I got back to the streak as quickly as possible.

Here are ten lessons I learned in this year of coding.

1. I am privileged
2. Make it a morning routine
3. Build something you need
4. Default choices make you productive
5. Keep a swipe file (backlog)
6. Separate thinking and doing
7. Dope vs. Discipline
8. Everything takes more time than planned
9. Can't do without the internet
10. Obsess over fundamentals; not techniques and tools
Email templates showcase
Tags: showdev
Published: 2019-08-16 12:16:50

---
title: Email templates showcase
published: true
description: Find Awesome Email Templates by MySigMail Card Community
tags: showdev
---
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/glel84p6s5qt4iont8za.png)
Hi, 👋

I would like to introduce you to an additional small project MySigMail Card Showcase - a place where MySigMail Card users can lay out their templates. On a site there is a possibility of search by the name, on tags and on authors of templates. You can vote for your favorite templates. Downloadable working files of templates can be loaded to Project in MySigMail Card.

As in the MySigMail Card there was an integration with the given site, it is possible to carry out the direct appendix search on a template and at once to load them.


![](https://mysigmail.s3.eu-central-1.amazonaws.com/card/showcase.gif)

I hope it will be useful for someone

I'm sorry that there's not enough template there now, all the time it took me to develop 🙏

https://showcase.mysigmail.com/
Tips for using email well
Tags: letterstoanewdev, email, excerpt, tips
Published: 2019-10-19 15:32:25

---
title: Tips for using email well
published: true
tags: letters to a new dev,email,excerpt,tips
canonical_url: https://letterstoanewdeveloper.com/2019/08/16/tips-for-using-email-well/
---

Dear new developer,

Writing great emails is a key skill. For all the hullabaloo about slack, emails still rule the roost when it comes to cross organization communication. This is because everyone has email, it is auditable and uneditable once sent, and requires no special permission beyond knowledge of an email address.

Email is great at conveying information, but horrible at conveying context. It also can be unclear and ambiguous. Because email is asynchronous, ambiguity causes slowdowns and confusion more than ambiguity in conversation (where you can say something like “when you said tomorrow, do you mean Saturday or Monday, the next business day?”).

[This post](https://iridakos.com/how-to/2019/06/26/composing-better-emails.html) has some great tips on how to write great emails. From the post:

> Avoid using only temporal adverbs/nouns like yesterday, today, tomorrow, two hours ago etc but include also the specific dates/times otherwise they might be misunderstood or require from recipients to check the email’s sent date/time to calculate the actual time.

and

> Use bookmarkable links when you refer to something that would eventually require from the recipient to search for in another platform.

There are a number of other great tips for writing clear emails in this post. The author also provides before and after examples, which really illustrate the points.

Worth a read.

Sincerely,

Dan
Important Tips to Design List in UI
Tags: uxdesign
Published: 2019-08-16 11:29:00

We often use lists in user interface. so there are some important points which we should always keep in mind when designing list in any user interface. I am going to discuss some points through you can improve your user interface design, moreover these tips are proven by professional <a href="https://www.oodlesstudio.com/ux-consulting-services/"> user research consultants</a>.

 
Tips to Design List in UI:

 
1.) Consistency

 

Consistency is the first basic thing to keep in mind when using any list in a user interface design. A list, vertical or horizontal is a redundant component with same elements in each list item. The values of items may be different but the layout and design should always be consistent. Because if we use different layouts and designs for each list in a single UI then it will not look proper and elegant also it will be confusing.

 
2.) Logical

 

Each and every List should be logical or we can say order should be maintained in each list. It may be ascending or descending. If we take an example of list which consist action done as per date, so we can make a list starting with most recent action and so on or with earliest action. Because a list in proper order is always more understandable than a list in improper order.  

 
3.) Actionable

In a User interface design each list should be actionable. Means the items of the list can also be a link but the values of those items should be in proper order so that user can easily act on that. When we take an example of metadata, spending counts is the best example for this.

 
4.) Sub-header

 

If we design a list without sub-headers then the list will look like an abstract data. So for giving it feel of list we should always use sub-header, which should be aligned with left data of the list, and list should be summarized by copy. If we place any sub-header which is aligned with right data then it will act as a counter.

 
5.) Hover

 

When we talk about interactions then Hover states tell users that the item in the list is actionable. So for making any item actionable we can use some shadow or we can change the background colour on hover. 

 
6.) Overflow

 

Lists are not only useful in web applications, they are also very useful in mobile and tablet applications. So we can explore each and every row overflow from an actionable point of view. As we can use left to right or right to left are go to actions.

 
7.) Keylines

 

Every list should have keylines which defines the proper spacing and alignment of each element across the list. We should follow the 8 px rule for the spacing and alignment and these should be slowed right down the list.

 
8.) Padding

 

In general we should follow the 8px rule for padding. Each row in the list should have the 16px vertical and horizontal padding and the sub-header should have 8pz padding with its respective item. 

 
Conclusion

So these are some basic things which we should always keep in mind while designing any list in a user interface design so that our list can look proper placed and aligned in the design also it will be more understandable.
Image Processing MATLAB Mean ve Median Algoritması (Örnek)
Tags: görüntüişleme, imageprocessing
Published: 2019-11-02 16:22:08

---
title: Image Processing MATLAB Mean ve Median Algoritması (Örnek)
published: true
tags: görüntü-i̇şleme,image-processing
canonical_url: 
---

![](https://cdn-images-1.medium.com/max/466/0*SuaiXAdh3YoDQQY0)

![](https://cdn-images-1.medium.com/max/466/0*vCS_TCy4m6f7bSW0)

![](https://cdn-images-1.medium.com/max/466/0*qsAZPBPDJVpTa7dL)

Örneklerimizde 3×3 filter, ve siyah beyaz bir resim kullanılmıştır.

> Görüntü ve sinyal işleme konularında, gürültü temizlemek için kullanılan yöntemlerdir. Amaç parazitleri kaldırmaktır. Filtre uygulandıktan sonra resimde bulunan ve komularından belirgin şekilde ayrılan piksel’leri tespit edilerek temizlenmesi sağlanır.  
> [more1…](https://en.wikipedia.org/wiki/Median_filter)  
> [more2…](http://bilgisayarkavramlari.sadievrenseker.com/2007/11/26/ortanca-filitresi-median-filter/)

### Mean Filter Algoritması

Amacımız;

- Resminizi pixel pixel okumak.
- Her pixel’in etrafında bulunan n kadar uzaklıktaki pixellerin değerleri toplamının ortalamasını almak.
- Yeni resimde aynı konumdaki pixele bulduğumuz ortalamayı atamak.

{% gist https://gist.github.com/berkayakcay/bcc2385465fe240fcf2c7d23252de39d %}

### Median Filter Algoritma

Amacımız;

- Resminizi pixel pixel okumak.
- Her pixel’in etrafında bulunan n kadar uzaklıktaki pixellerin median değerini bulmak.
- Yeni resimde aynı konumdaki pixele bulduğumuz median değerini atamak.

{% gist https://gist.github.com/berkayakcay/86cdd029343b54617db17d4932e7ad39 %}
gotta get down on Friday, scraping view counts from youtube
Tags: selenium, python
Published: 2019-08-16 11:09:57

---
title: gotta get down on Friday, scraping view counts from youtube
published: true
description: 
tags: selenium,python
---

It is Friday. And you have to get down on Friday.

How many views does RB's video Friday have on Youtube right now?

You can do this with Selenium. 

<sub>**disclaimer** this is clearly just for fun, some sites frown on being scraped... :)</sub>

```python


ytlink="https://www.youtube.com/watch?v=kfVsfOSbJY0"

from selenium import webdriver
from selenium.webdriver.common.by import By

import time
driver = None

try:
    cpath = "e:\\projects\\headless\\chromedriver.exe"
    driver = webdriver.Chrome(cpath)
    driver.get(ytlink)
    # how do we fix this next statement?
    time.sleep(5)
    cs_selector = "#count > yt-view-count-renderer > span.view-count.style-scope.yt-view-count-renderer"
    e = driver.find_element(By.CSS_SELECTOR,cs_selector)
    time.sleep(3)
    txt_views = print(e.text)
    

finally:
    if driver is not None:
        driver.quit()
```

Have a great weekend!!!
Sitecore Resources To Get You Started
Tags: sitecore
Published: 2019-08-16 11:02:20

Traditionally, Sitecore hasn’t been the easiest CMS to get into if you’re not working for a partner or with a client that has a Sitecore license already. Without a license, Sitecore won’t run and you’ll get a YSOD error screen. Also, getting the Sitecore CMS software isn’t the easiest either, as you need access to the <dev.sitecore.net> website, which you get credentials for after completing Sitecore training (or completing the developer training).

That said, here are some resources to get going with:

* [Sitecore developer website] (https://dev.sitecore.net/) – this is where you can download the software, with links to official documentation
* [Sitecore developer license] (https://www.sitecore.com/getting-started/developer-trial) – you can get a temporary 60-day license here, with one renewal, to help you get into the software
* [Sitecore Slack] (https://docs.google.com/forms/d/1bAVDgP5-FhFh8ohPchHtifq-rz7EBkuPojAzdEofJyo/viewform?edit_requested=true) – a Slack devoted to Sitecore, with many channels for specializations; the link provides a form to request access
* [Sitecore StackExchange] (https://sitecore.stackexchange.com/) – a community Q&A frequented by many developers and Sitecore MVPs
* [Sitecore Helix] (https://helix.sitecore.net/) – a set of development principles being adopted by many Sitecore developers

I’m not including any tools like [Glass] (http://glass.lu) or [Unicorn] (https://github.com/SitecoreUnicorn/Unicorn) or [TDS] (https://www.teamdevelopmentforsitecore.com), since using those are driven more by a developer’s choice, or the team’s choice, or even a client’s choice. I have my preferences, or things I want to learn, but your mileage may vary as you get into things.

Anything else from a ground-up learning department? Please leave them in the comments!
Scalable Angular Application Architecture
Tags: angular, redux, architecture, webdev
Published: 2019-08-16 10:52:27

*Currently, one of the most popular frameworks among the Web community is Angular (or Angular 2+ as some prefer). The main reason why we in GFT have decided to use it in our projects, is its comprehensive character, and a strong push it gives towards consistent project structure and architecture.*

Unfortunately, even a framework as opinionated as Angular can only enforce the basics of application architecture. That's sufficient for small or medium applications, however, in GFT we usually have to deal with big applications, composed of dozens of modules and filled with complex data collections and complicated user flows. What is more, our projects are often developed by a team scattered across different continents and time zones.

In order to maintain high quality of delivery and prevent technical debt from being created, we had to agree to a series of guidelines and good practices of how to plan, structure and write applications in Angular.

These architecture principles can be divided into three main categories:

1. Project structure – how to organize you project files, define and work with Angular modules and their dependencies
2. Data flow architecture – a guide on how to define that way the data flows through your application layers
3. State management – how to manage the state of GUI and propagate it between different application parts

This article is a combination of community–inspired guidelines and the experience that we've gathered working in our projects.

[See the original article](https://bulldogjob.com/articles/539-scalable-angular-application-architecture)
Bad experiences in technicolor (part 2)
Tags: career, beginners, personal
Published: 2019-08-16 10:44:00

I'm not particularly proud of this part of my formational/professional life, but I'm not exactly ashamed neither.

After <a href="https://dev.to/nokiz/bad-experiences-in-technicolor-part-1-8cm">I lose my first job</a>, I enrolled into university and then dropped out of it.

<h3>Why?</h3>

After 4 years of studying middle and upper computer programming and a lost job, I though that the logical step was to get into university.

Take in mind that my previous formation was not in the university but it gave me a solid framework to understand, research and solve any problem I could encounter in my work life.

But I haven't had a university degree.

I was one of the 5 oldest persons in classroom (of a 50 people classroom). My classmates where mostly in his 19ish while I was 27 and that was like a step backwards to me.

I also had idealized university. I though that there I would be able to focus and learn about the things that most interested me but, friend, I was so wrong... That was like high school part 2: Lectures - Homework - Exam.

4 months after I was not attending to any classes and at the end of the semester, I officially left.

<h3>The lesson, dear reader</h3>

Like in the <a href="https://dev.to/nokiz/bad-experiences-in-technicolor-part-1-8cm">first part of this post</a>, what at first I thought it will be an amazing experience, revealed as a frustrating and disappointing one. Do you see a pattern here?

But I don't think the experience was completely negative. I knew when I had enough and left just in time to not to lose more time, and that was a big lesson.

I'll go on in part 3. Thanks for reading :)
Number Classification
Tags: math, cs
Published: 2019-08-16 20:26:25

---
title: Number Classification
published: true
tags: math, cs
canonical_url: https://vorakl.com/articles/numbers/
cover_image: https://vorakl.com/files/numbers/numbers.png
---

Mathematics is unique. The unique science if everyone could agree that it is a science. But, it's also hard to argue that it is not Art. Math is absolutely certain, except the cases when it is not ("[as far as the laws of mathematics refer to reality, they are not certain; and as far as they are certain, they do not refer to reality](https://en.wikipedia.org/wiki/Mathematics#cite_note-certain-39)"). Still having no one general definition, Math doesn't even bother to one opinion on such the fundamental building block of Mathematics as [Numbers](https://www.mathsisfun.com/numbers/evolution-of-numbers.html). Nevertheless, Math is an important part of almost every field of science, engineering, and human life.

  

Here is the most common and well-accepted number classification tree:

[![Number classification](https://vorakl.com/files/numbers/numbers.png)](https://vorakl.com/files/numbers/numbers.png)

  

It also shouldn't be a surprise to find slight distinctions in the meaning of the same essences in _Math_ and _Computer Science_ (CS):

- **Natural numbers**. In Math, they are meant to be _Positive Integers_ (1, 2, 3, ...), but in CS they are _non-negative Integers_ which include Zero (0, 1, 2, 3 ...)
- **Mantissa**. In Math, it is a _fractional part_ of the logarithm. In CS, it is _significant digits_ of a floating-point number (thus, quite often are used other definitions, like [significand](https://en.wikipedia.org/wiki/Significand) and coefficient)

  

There is a quite related topic in terms of the values which a variable can take on. In mathematics, a variable may be two different types: [continuous and discrete](https://en.wikipedia.org/wiki/Continuous_or_discrete_variable):

- A variable is **continuous** when it can take on infinitely many, uncountable values. There is always another value in between two others in a non-empty range, no matter how close they are.
- A variable is **discrete** when there is always a positive minimum distance between two values in a non-empty range. The set of numbers is finite or countably infinite (e.g. Natural numbers)

The understanding of the discreteness is crucial in Computer Science as all real-world computers internally work only with discrete data (which makes it challenging to represent Irrational numbers). All existing computability theories (e.g. [Turing thesis, Church thesis](https://en.wikipedia.org/wiki/Church%E2%80%93Turing_thesis)) are defined on discrete values, and the domain is the set of Natural numbers.
Getting Back to my Code Editor
Tags: newbiecoder, momswhocode, momintech
Published: 2019-08-16 10:19:03

---
title: Getting Back to my Code Editor
published: true
description: 
tags: newbiecoder, momswhocode, momintech
---

I started learning how to code in 2013. I came across a tutorial on YouTube "Learn HTML & CSS in One Hour" and many free and paid courses later-6 years to be exact, I gave up completely. I was stuck in tutorial purgatory, constantly learning the same thing over and over again and not knowing how to put what I was learning into something of my own. I watched all of the females in tech move up and onward and I was still at step 1 not knowing what to do with what I was learning. I got intimidated and I felt like I was stupid, So I stopped coding altogether. I would attend overnight tech conventions and always felt like a fraud, wrecking my brain daily with "what can I build to show I know how to code." Because I haven't coded in so long I feel like I have to start at square one...HTML. 

I started really getting into coding after I did research and found out that being a Web Developer as a mom it would really change our lives. I wanted a career where I could work from anywhere in the world and still be a fulltime mom, that was my WHY. I've been on the brink of homelessness and unemployment so many times since becoming a mom and I truly felt, and still believe that Web Development is my way to a better life. 

This time around I would really like to see how far I can get by the end of December. 

I just ask for some suggestions on how to stay focused and what I can do to show my coding skills?
How to Easy Edit for clients?
Tags: help, codenewbie
Published: 2019-08-16 10:16:47

---
title: How to Easy Edit for clients?
published: true
description: How do you create a website for a client and then leave it, where they can edit.
tags: help, codenewbie
---

Hi guys, I have been thinking about helping a friend out with a website for a while now but I don't want to be stuck updating little details here and there all the time.

How do you or what do you use on websites you create to have a login screen for the "admin" to edit content and images easily with no code?

What is the name of this so that I can look into it in more detail? CMS? 

I looked at contentful but it didn't seem to be what I'm asking about unless I'm wrong?

I looked at HTML contenteditable attribute and someone suggested locking behind your own login system but I thought this was long winded and must be an easier way?

Thanks!
The Code of the Apollo 11
Published: 2019-08-16 09:38:33

---
title: The Code of the Apollo 11
published: true
description: I stumbled upon something cool. Have to share it with dev.to
tags:
---

Hey awesome dev community,

I found this really cool course on Pluralsight and I wanted to show it to you guys, It's also very short (30 mins). Go check it out.

Course Link:
https://www.pluralsight.com/courses/moon-landing-apollo-11

Github Link:
{% github https://github.com/chrislgarry/Apollo-11 %}

As always,
**Happy coding 🔥🔥**
**“كود بسعادة”**