teleren/devto huggingface dataset:
Mentor = Teacher, supervisor, friend
Tags: mentor, teacher, heriotwatt, dubai
Published: 2018-04-20 07:38:21

---
title: Mentor = Teacher, supervisor, friend
published: true
description: Experiences i had with my professor during my Post Graduation.
tags: mentor, teacher, heriot watt, dubai
---

Finally I am done with my Masters degree from Heriot Watt University Dubai (HW). It was one of the wise decision I took on enhancing my technical knowledge. As my bachelors was on Computer Science I was eager to learn more about the core concepts of Networking, Algorithms and data structures.

Learning is a continuous process which involves hard work, eagerness to learn new things and patience. But I always believed there should be someone who really shows you the right direction on achieving the targets. During my time at HW I was fortunate to meet a lot of technically skilled, caring and loving mentors who really wanted their students to understand what they are learning. Among them I met a great Mentor Talal Shaikh a tech enthusiast. I really wanted to thank him for guiding me in the right direction.

In this busy world, finding a mentor who spends enormous time just to understand their students and helps them to pursue knowledge by showing them the right path is really hard. He did this not to me alone but to many others as well. He will be right there in his office during holidays and post working time on weekdays always with a smile in his face.

What made me write this article is, soon after the graduation i was only able to spend few minutes with him as there are many other students waiting just to thank him. It was just like a crowded train station, students coming over hugging, shaking hands, asking for references. That point of time I understood the real meaning of the word ‘Mentor’.

I was very fortunate to undertake my research thesis under him. The thesis was completely new to me, as it was all about Recommender Systems, Natural Language Processing, Anagrams etc. But throughout the whole period he supervised me on choosing related research papers and choosing some great reference books.

Thank you for everything Talal Shaikh. You have added many synonyms to the word Mentor in my dictionary. I really hope you will be shining light for the future graduates as well. :)
From Python to..
Tags: discuss, tips
Published: 2018-04-20 05:36:09

---
title: From Python to.. 
published: true
description: 
tags: discuss, tips
---

Hi fellows! 

It's been a while since I wanted to learn a new language and since I love Python (3.x please), I started to investigate on existing/similar/powerful other languages. 

So far I can't choose among these: 
* go : syntax familiar enough to begin with easily
* ruby : seems to be very popular and handy

Since I don't have plenty of time to learn I can only focus on one of them for a long time so I would like to make the best choice. 

What would you tell me to chose? (why?)
Feel free to let me know about another one too! 

Have a wonderful day
How to make a responsive footer With No media Queries🗺 
Tags: grid, frontend, webdev, css
Published: 2018-04-20 05:11:14

---
title: How to make a responsive footer With No media Queries🗺 
published: true
description: footer with no media queries and  margins
tags: grid,frontend,webdev,css
cover_image: https://thepracticaldev.s3.amazonaws.com/i/z1ee73dbkoan0d6tunlg.png
---

## Footer with no media queries and Margins.

 Have bored of writing more code for simple things today I'm showing how to Write less code with more features.Once again I'm using a grid to achieve these.

 Grid is a new thing in css3 which is 2 dimensional the main thing in a  grid is very easy to make layouts with less time and less code.

![footer With No media Queries](https://thepracticaldev.s3.amazonaws.com/i/8dpziaekb3rsuwd2u0c8.gif)


**Just one line of code does all things**

```
 grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
```
## auto-fit and min-max functions are used.
I will explain what min-max is min-max takes two arguments first value is minimum and second is max value.

auto-fit helps us to cover the available space with the given columns.

### Check out Demo & Code in Code pen 

{% codepen https://codepen.io/saigowthamr/pen/yjNLMz %}
Gdiff / Gblame ~,p,:,HEAD 
Tags: vim, git
Published: 2018-04-20 04:59:22

---
title: Gdiff / Gblame ~,p,:,HEAD 
published: true
description: 
tags: #vim #git
---

Vimで GdiffとかGblame 使ってて、いつも忘れるのでメモ
Gblameでコミットログを出した後に、 ~,pで過去未来を辿れるが、そのあと現行のindexとdiffを出したいときは

```
:Gdiff :
```

すると現在のファイルと比較できる。 Gdiff master とか head を指定してしまうと挙動がちょっとあれになる

seealso : http://cohama.hateblo.jp/entry/20120317/1331978764
Weekly UI Challenge Week 2 Day 5: Past search term indicators
Tags: ui, weeklyui, challenge, react
Published: 2018-04-20 03:52:29

---
cover_image: https://thepracticaldev.s3.amazonaws.com/i/crr8zwevjxq2sapa81ps.jpg
title: "Weekly UI Challenge Week 2 Day 5: Past search term indicators"
published: true
description: "Week 2 Day 5 of my Weekly UI challenge: Looking up the past"
tags: ui,weeklyui,challenge,react
---

Welcome to Week 2, Day 5 of my Weekly UI challenge! Week 2 will focus on a **search bar** UI component; each day throughout this following week, I will pick one subelement of the design to implement. For day five, our goal is to…

## Add past search term indicators

When you use a search engine– especially one with autocomplete features– you're usually not just interacting with a server. The most advanced search systems implement some sort of [machine learning](https://en.wikipedia.org/wiki/Machine_learning) to make search results appear faster and more relevant. 

We won't be building a machine learning platform today, but adding indicators (or in my case, a separate list below the autocomplete options) for terms that have already been searched. This gives users an opportunity to revisit a search they already completed, or in other cases avoid making the same search again.

Following the original design I created, this is what I've got for **Day 5**:

![A search bar component, with input text element, autocomplete dropdown, and submit button](https://thepracticaldev.s3.amazonaws.com/i/o4fogk8pe25rwwfazcq5.jpg)

For consistency's sake, the past searched terms sit right below the autocomplete items. If you had a fully functioning search platform, you could populate this list with real results, but in my case, I just used a static list of terms that one may search in my fictional music app.

Here is an animation displaying the past search term list:

![An animation showing the search bar component in use, with text input to the input element, a button to trigger a search form submission, an autocomplete dropdown, and a logger display showing the output below](https://raw.githubusercontent.com/geoffdavis92/weekly-ui-assets/master/search-bar/day5/w2d5-animation.gif)

## Now it's your turn

I used [React.js](https://reactjs.org) and [Storybook](http://storybook.js.org) to develop my implementation, but you can use whatever technology stack you would like! (hint: if you use [Vue.js](https://vuejs.org/) or [Angular.js](https://angularjs.org), you can still use [Storybook for those libraries](https://storybook.js.org/basics/slow-start-guide/))

You don't even have to use a view library if you don't want to; HTML and CSS-only (and non-view JavaScript library) components are more than possible, especially for this step.

Also, please add your repos and/or images of your designs in the comments for inspiration! I would love to see what designs you all create.

Happy coding! 🎉

### Week 2 Calendar

1. (Sunday 4/15) Design component ✅
2. Input field ✅
3. Submit button ✅
4. Integrate autocomplete functionality ✅
5. Past search term indicators 🎯
6. 100% a11y score 
7. Tweaks, refactors, fixes
Python Peeps: For Unit Testing when do you prefer to use Unittest, Doctest, Pytest ?
Tags: discuss
Published: 2018-04-20 02:46:53

---
title: Python Peeps: For Unit Testing when do you prefer to use Unittest, Doctest, Pytest ?
published: true
tags: discuss
---

Examples of Unittest , Doctest and Pytest are listed bellow-respectively- if you aren't familiar with them. 

```python
# Testing Framework:
# Unittest supports test automation by writing classes.

import unittest


def fib(n):
    """Return the n-th number in the fibonacci series."""
    if n <= 0:
        return 0
    elif n == 1:
        return 1
    return fib(n - 1) + fib(n - 2)


class TestFib(unittest.TestCase):

    def test_fib_series(self):
        self.assertEqual(fib(0), 0)
        self.assertEqual(fib(1), 1)
        self.assertEqual(fib(2), 1)
        self.assertEqual(fib(3), 2)
        self.assertEqual(fib(4), 3)
        self.assertEqual(fib(5), 5)


if __name__ == "__main__":
    # normally this is unittest.main()...this is for jupyter
    unittest.main(argv=['first-arg-is-ignored'], exit=False, verbosity=2)


```


```python
# Testing Framework:
# Doctest allows you to write tests in the docstrings

def fib(n):
    """Return the n-th number in the fibonacci series.

    >>> fib(0)
    0
    >>> fib(1)
    1
    >>> fib(29)
    514229
    """
    if n <= 0:
        return 0
    elif n == 1:
        return 1
    return fib(n - 1) + fib(n - 2)


if __name__ == "__main__":
    import doctest

    # doctest.testmod()
    doctest.testmod(verbose=True)
```

```python
#Testing framework pytest
# Test discovery: for doctests, unittests and pytests.

import pytest


%%run_pytest[clean] -vvv

def fib(n):
    """Return the n-th number in the fibonacci series."""
    if n <= 0:
        return 0
    elif n == 1:
        return 1
    return fib(n-1) + fib(n-2)

def test_fib_series():
    assert fib(0) == 0
    assert fib(1) == 1
    assert fib(2) == 1
    assert fib(3) == 2
    assert fib(4) == 3
    assert fib(5) == 5

```
Congratulations on Wsoftpro and Akeneo Integration
Tags: magento2, wsoftpro, akeneo, integration
Published: 2018-04-20 02:29:02

---
title: Congratulations on Wsoftpro and Akeneo Integration
published: true
description: WSoftpro with team of over 50 experts in PHP and Symfony offer consultation, installation, customisation and ongoing support for Akeneo. During the last three years we built many Akeneo PIM and integrated them into Magento ecommerce shops sucessfully. If you have any question or concerns about your Akeneo system, feel free to leave us a note below.
Click to the link below for more detail: http://wsoftpro.com/akeneo
tags: magento2,wsoftpro, akeneo, integration
---
Import your existing Postgres database and get a GraphQL backend with access control
Tags: graphql, postgres, tutorial, webdev
Published: 2019-12-20 07:44:37

---
title: Import your existing Postgres database and get a GraphQL backend with access control
published: true
date: 2018-04-20 00:00:00 UTC
tags: graphql, postgres, tutorial, webdev
canonical_url: https://blog.hasura.io/import-your-existing-postgres-database-and-get-a-graphql-backend-with-access-control-c1196600360e/
---

![](https://blog.hasura.io/content/images/2019/01/0-zW6_54PZ8WTmzijL.png)

If you’re using [Postgres](https://hasura.io/learn/database/postgresql/introduction/) (say as a part of your backend stack, say Ruby on Rails, Django) you can easily try out GraphQL APIs on top of your existing database with the Hasura GraphQL engine.

It is as simple as exporting and importing the database with the tools that you are familiar with (`pg_dump` and [psql](https://hasura.io/learn/database/postgresql/installation/psql/))!

The Hasura GraphQL engine works without you going through the effort of writing schema, resolvers etc. You model your schema in Postgres and we expose it over GraphQL with declarative permissions so that you have access control.

I’ve made a 2 minute video of me taking a dump (🚽 har har) of the [Chinook database](https://archive.codeplex.com/?p=chinookdatabase) and exposing GraphQL on it. Check it out and let me know what you think!

{% youtube Tt3bLzNTork %}


[_**Hasura**_](https://goo.gl/QfCiQV) _gives you instant realtime GraphQL APIs over any Postgres database without having to write any backend code._

_For those of you who are new to the Hasura GraphQL engine,_ [_**this**_](https://docs.hasura.io/1.0/graphql/manual/index.html) _is a good place to get started._
An Old Dog Learning New Tricks
Tags: career
Published: 2018-04-19 22:46:14

---
title: An Old Dog Learning New Tricks
published: true
description: An Old Dog on a New Journey
tags: career
---

![Dog using a laptop](https://thepracticaldev.s3.amazonaws.com/i/7yuyeznk5b1lgk1pbckx.jpg)

After surviving a recent round of layoffs in my current position, I decided to compare my current skillset against what is being sought after on LinkedIn. I was shocked about how much had changed in four years. I was also a little disappointed in myself for not keeping my skills up to date. I knew very little about Node.js, Angular or any of the reactive frameworks. I used Handlebars from time to time, but that's about as close as I ever got to templating. I also haven't really been apart of "the conversation" beyond what I do at work.

I decided to learn Node.js, TypeScript and Angular. Someone at work tried to introduce Vue.JS to my team, so I added that too. Udemy was a big help in getting myself up to speed in these technologies. Suddenly coding was becoming a joy again. These frameworks like Vue and Bootstrap took a lot of the tedium out of coding UI so that you can get to a prototype stage a lot faster than ever before. Gone are the days where you have to write Javascript code to crawl through a table to aggregate data to send it back to the server, now it all gets updated directly with every form control update. I felt like a kid in a candy store.   

The best thing that came out of this is that I feel like I am a part of the coversation again. I started listening to developer podcasts and I have signed up for a couple of local developer meet-ups. I also feel like have gained leverage in my current position because now I knew skills way beyond what I do. 

Something else I've learned is that you shouldn't limit yourself to what you use in your current position. Learning new skills can help reinvigorate your interest in being a developer. 

I forgot to mention I'm 46 old. I cut my teeth on VBA, HTML and SQL Server. I was coding before there was an ASP or a .Net. There have been a lot of conversations about older developers and how hard it would be to get a job later in life if I ever needed to. I think that as long as you stay excited about the industry, keep yourself in the middle of the conversation and understand that there is a world to explore that goes way beyond your place of work, you'll always be relevant. Making excuses for why you shouldn't learn is the fastest way to make yourself obsolete.

Now excuse me, I have a .Net Core/Angular class to go take.

Here's to learning!
People using Go in production, what are you using it for?
Tags: go, ask, learning
Published: 2018-04-19 18:10:21

---
title: People using Go in production, what are you using it for?
published: true
tags: Go,Golang,Ask,learning
---

I've been looking at learning Go and bit more and seeing what it's all about v.s. PHP, Python, Ruby etc. I know there are a bunch of people using Go, but I'm wondering where it's fitting in everyone's workflow. Are you building full fledged webapps with it? Or are you building microservices for small parts of your API? Lambda functions?
Is the Managed Code Slower than the Native Code?
Tags: code, dotnet, managed, native
Published: 2018-04-20 13:50:54

---
title: Is the Managed Code Slower than the Native Code?
published: true
tags: Code,dotnet,managed,native
canonical_url: http://www.elemarjr.com/en/2018/04/is-the-managed-code-slower-than-the-native-code/
---

 ![](http://www.elemarjr.com/wp-content/uploads/2018/04/evan-dennis-75563-unsplash-300x200.jpg)

That is a question that I have been answering for years. **The answer is an emphatic “NO” in most cases**.

What is true is that .NET make it very easy to write slow code. [Being more friendly, it is pretty standard for .NET developers being sloppy and uncritical about performance and that, I think, is the main reason why some .NET applications performance sucks.](https://twitter.com/intent/tweet?text=Being%20more%20friendly,%20it%20is%20pretty%20standard%20for%20.NET%20developers%20being%20sloppy%20and%20uncritical%20about%20performance%20and%20that,%20I%20think,%20is%20the%20main%20reason%20why%20some%20.NET%20applications%20performance%20sucks.&url=http://www.elemarjr.com/?p=7862&via=elemarjr)

RavenDB team is doing a great job proving, again and again, that managed code can be so fast as Native Code. Why? Because we pay attention to performance starting from the [architecture](https://www.youtube.com/watch?v=eRjWYjEf8n4) to the [implementation](https://www.youtube.com/watch?v=eRjWYjEf8n4).

When you build your .NET code, the compiler translates it to Intermediate Language and metadata. Then, when you run your code, whenever a method is executed for the first time, the Just in Time Compiler convert it to assembly code. Most of the code optimization happens at this stage (If you want to understand this process, I recommend you to [read this post](http://www.elemarjr.com/en/2018/04/trying-to-improve-performance-in-net-here-are-the-basics-you-need-to-know-about-intermediate-language-jit-windbg-and-assembly/)).

The quality of the JITted code is fantastic. Microsoft has improved the JIT, especially quite recently.

In fact, there are advantages in the Managed World:

1. Since the code is JITted as it is executed, its location in memory is better than that of native code. The related code will be often closer, commonly in a single memory page or the cache. So we have fewer page faults;
2. Different from Native Code, .NET applications are less susceptible to memory fragmentation and. When it happens, the Garbage Collection compacts the heap solving the problem.
3. The memory allocation occurs with no contention.

Remember: Garbage Collection in .NET is deterministic. We can significantly affect how often it runs by controlling the memory allocation patterns, object scope, etc.

 
 

[Is the Managed Code Slower than the Native Code?](http://www.elemarjr.com/en/2018/04/is-the-managed-code-slower-than-the-native-code/) appeared first at [Elemar JR](http://www.elemarjr.com/en).
Who is hiring? (April 2018) 
Tags: whoishiring
Published: 2018-04-19 16:42:28

---
title: Who is hiring? (April 2018) 
published: true
description: Members of the dev.to community sharing open job opportunities at their companies.
tags: whoishiring
---

We're going to start hosting a monthly thread where community members can share openings at their companies.

Here a few ground rules:

- Please only post if you are personally part of the hiring company (no recruiting firms)
- Please provide brief background on what your company does
- Only one post per company (you can list multiple openings in the post)

Consider using this template:

```
Company Name | Job Title | Location | Remote or Onsite | (optional) Salary Range

About the company — background, size, etc (1-3 sentences)

About the role(s) — languages, requirements, etc (1-3 sentences)

Do you sponsor visas?

How to Apply — email or application link
```

---

We also wanted to share some quick careers-related notes from our fantastic Sustaining Sponsors.

### Digital Ocean

> At **DigitalOcean**, we're simplifying cloud infrastructure for developers. Here you'll get to work with some of the smartest and most interesting people around; solving unique and complex technical challenges on a scale matched by few companies. If you get excited about stretching yourself in new ways, developing yourself to your fullest potential, with amazingly supportive friends and colleagues; [we want to talk to you](https://www.digitalocean.com/company/careers/?utm_source=devto&utm_medium=display&utm_campaign=Devto_2018_Brand)!

### Flatiron School

> Join a passionate team shaping the future of education.  Since 2012, **Flatiron School** has helped over 1,000 students learn to code and launch careers in tech.  We're looking for the right people to join us a we gear up to rapidly expand our programs and change more lives.  Check out [careers page](https://flatironschool.com/careers/) to view our open positions.

### Bugsnag

> At **Bugsnag**, we’re building powerful tools that help developers detect, prioritize, and resolve application errors more efficiently than traditional tools. Our technology is used by over 4,400 of the world’s leading engineering teams, including: Airbnb, Eventbrite, Lyft, Mailchimp, Namely, Pandora, Shopify, and Square. We’re growing and currently hiring for roles across all teams. View open positions on our [careers page](https://www.bugsnag.com/jobs/?utm_source=dev.to&utm_medium=cpc&utm_content=hiring-post&utm_campaign=dev.to-2018-april).
Laravel tips: Model::findMany is useful
Tags: laravel, php
Published: 2018-04-19 15:53:38

---
title: Laravel tips: Model::findMany is useful
published: true
description: 
tags: laravel, php
---

When you want to get multiple results of `find` with array of ID, you can pass the array to `Model::find`.

This feature started to be documented since Larave 5.2, but I found that we can use it even in Laravel 5.1.
I read Laravel source code (with no objective) then found it.

```php
>>> App\User::find([1,2,3])

=> Illuminate\Database\Eloquent\Collection {#1090
     all: [
       App\User { id: 1 },
       App\User { id: 2 },
       App\User { id: 3 },
     ],
   }
```

I used to write like `User::whereIn([1, 2, 3])->get()` before I found this technic.

We can also use `findMany` method. Actually `find` method runs `findMany` if the first argument is array.

in `laravel/framework/src/Illuminate/Database/Eloquent/Builder.php`

```php
public function find($id, $columns = ['*'])
{
    if (is_array($id) || $id instanceof Arrayable) {
        return $this->findMany($id, $columns);
    }
    return $this->whereKey($id)->first($columns);
}

public function findMany($ids, $columns = ['*'])
{
    if (empty($ids)) {
        return $this->model->newCollection();
    }

    $this->query->whereIn($this->model->getQualifiedKeyName(), $ids);

    return $this->get($columns);
}
```

https://github.com/laravel/framework/blob/ba0fa733243fd9b5abac67e40c9a1f7ba2ca0391/src/Illuminate/Database/Eloquent/Builder.php#L287

So we can use this method like `User::findMany([1, 2, 3])`. 
I personally prefer this way because it is more explicit.
I'm a UX UI developer, ask me anything!
Tags: ama, ux
Published: 2018-04-19 15:44:47

---
title: I'm a UX UI developer, ask me anything!
published: true
description: customizing user flow for specific environments
tags: AMA, ux
---
I program interfaces customizing user flow for specific environments. This could be

  * product specific
  * user specific (ie accessibility, etc)
  * market specific

## Ask me anything!