teleren/devto huggingface dataset:
Coding procrastination keeps me back and my plan to handle the future
Tags: beginners, productivity, career
Published: 2019-06-27 14:08:28



It's been two months since my last bootcamp. Let the coding procastination begin! Sadly, I am no closer to the goal I set forth to complete by August 1st, 2019. From this previous post, I made my intention clear that I would do everything it took to finally land a coveted tech job. Yet now I find myself in a government funded skilled trades program. While I'm grateful for the opportunity and tactile experiences, I feel my bias against this employ remain still. The program and text books are free so it's soemthing different, but I don't see any longer term career out of this. For now, I'll stick it out and continue to work on ways to get back into the software development habit.

But to make that habit successful, I need to understand how I get distracted from coding when life opportunities occur.

For the full post please click here. Have a wonderful day!
http://afropolymath.com/procastination-sucks-ass-when-your-broke/
Persuasive Software Testing Course Udemy
Tags: testing, software, product
Published: 2019-06-27 14:07:02

---
title: Persuasive Software Testing Course Udemy
published: true
tags: testing,software,product
canonical_url: https://www.alanmbarr.com/blog/persuasive-software-testing-udemy.html
---

## Course released on Udemy

Recently I decided to release my [course](https://www.udemy.com/persuasive-software-testing/) on udemy. I want people around the world to benefit from these skills and I am hoping to improve the course over time.
Mobile App Development Company In Kuwait-DxMinds 
Tags: mobile, app, development, company
Published: 2019-06-27 13:28:30

We at DxMinds Technologies Inc, are a software development company concentrating on fast innovation, exhibiting award-winning mobile applications development company, cloud-based solutions and web app for Startups, SMBs, SMEs, and fortune companies to build and support the flourishing and related business by assuring a level of belief that other service providers are incapable to meet.
Specialties
Artificial Intelligence, Machine Learning, IOT, Internet of things, Blockchain, Cloud Services, Information Technology, Mobile App Development, App Development, Chatbot App Development, Python Software Development, AI App Development, Mobile Application Development, Android App Development, iOS App Development, React Native App Development
UAE Office:
 Address: P.O.Box. 211200 – Office 1109,
Al Moosa Tower 1, Sheikh Zayed Road, Dubai, UAE
 Contact : +971-501529161
 Email: info@dxminds.com
India
#61, 1st Floor, 7th Main, 12th Cross Rd, BTM 2nd Stage, Bengaluru, Karnataka 560076
 +91-7483546629
 info@dxminds.com

to know more visit :  https://dxminds.com/top-mobile-application-development-company-in-kuwait/
I don't want to see posts like "Which Framework is Winner?"
Tags: javascript, opensource, webdev
Published: 2019-06-27 13:27:06

---
title: I don't want to see posts like "Which Framework is Winner?"
published: true
description: 
tags: #javascript #opensource #webdev 
---
I happened to see my past post, but the quality is awful.
Below is the link 📲

[I am a React Developer.](https://dev.to/malloc007/i-am-a-react-developer-15kj)
The title is totally doesn't make sense me at Sep 14, 2018 ʅ（◞‿◟）ʃ

Anyway I'd like to write my opinion again.

Behind this article, there is a context of those days.
That is [Vue Passes React's Star Count on GitHub](https://news.ycombinator.com/item?id=17320123).

So I wanna claim that to be clear, Library authors doesn't have working motivation sort of who want to dominate the market share.
They are focusing on how to provide the way for enhance software development. 


### Conclusion
We don't have to post like "Which Framework is Winner?".
Because there is no looser, there are various way of software development.
I think It's so colorful 🌈
Improve your GitHub repo visibility on Social Networks
Tags: github, discuss, tutorial, seo
Published: 2019-06-27 13:15:13

I just discovered a very interesting way to improve the display of a GitHub repository on social networks!

![](https://thepracticaldev.s3.amazonaws.com/i/wj6em2ki1r35p5hvd1bx.gif)
<figcaption>Really?</figcaption>

Basically, when you publish a link to a GitHub repository on a platform that supports meta tags (like OpenGraph), the display is a little poor:

![](https://i.imgur.com/nkqOWd7.png)
<figcaption>An overview of how Facebook displays it</figcaption>

![](https://i.imgur.com/2NcLYqY.png)
<figcaption>An overview of how Twitter displays it</figcaption>

Indeed, a new "Social preview" section has recently appeared in the repository settings.

![](https://i.imgur.com/p2F11jo.png)
<figcaption>It's that simple!</figcaption>

From then on, you can define an image to customize (improve) the appearance of your repository on social networks. The recommended image size for optimal display is 1280×640px. The minimum size is 640×320px.
You also have the possibility to download a basic template that will help you create (if you have not already done so) your image with optimized margin management.

![](https://i.imgur.com/2ZhTTA5.png)

Here is the result once the new image has been uploaded:

![](https://i.imgur.com/NOY58uu.png)
<figcaption>On Facebook</figcaption>

![](https://i.imgur.com/ErLtDX9.png)
<figcaption>On Twitter</figcaption>

Here is a simple way to look after the appearance of your repository on social networks and sites that support meta tag display.



Cheers! 🖖
A helper hook to remember values by deep equality
Tags: react, javascript
Published: 2019-06-27 12:53:19

So of course every React hook enthusiast will have had a use-case for a deep (structural) equality check on the dependencies argument, at a certain point in time. Instead of crafting these things every time you need them, or importing a helper library, here's a wonderfully simple helper hook to help you out:

```ts
import { useRef } from "react";
import isEqual from "react-fast-compare";

export default function remember<T>(value: T): T {
  const ref = useRef<T>(value);
  if (!isEqual(value, ref.current)) {
    ref.current = value;
  }
  return ref.current;
}
```

You can use it like this:

```ts
const something = useMemo(expensiveComputation, [ remember(input) ]);
```

Isn't that just lovely? :D
Design patterns: Simple factory
Published: 2019-06-27 12:04:23

---
title: Design patterns: Simple factory
published: true
description: Short description of simply factory pattern.
tags: 
---

The simple factory is one of the creational design patterns. It creates objects with the same interface. The concrete object is created depend on arguments in the method.

#Example:
Let assume that we like to have different configs for an application depend on the environment. So we create two classes:

```php
class ConfigProd implements ConfigInterface
{
    public function getDatabaseName(): string
    {
        return 'database_prod';
    }
}

```

```php
class ConfigDev implements ConfigInterface
{
    public function getDatabaseName(): string
    {
        return 'database_dev';
    }
}

```

Each class implements the same interface:
```php
interface ConfigInterface
{
    public function getDatabaseName(): string;
}


```

And of course we have a simple factory:
```php
class ConfigFactory
{
    public function createConfig(string $environment): ConfigInterface
    {
        switch ($environment) {
            case 'dev':
                return new ConfigDev();
            case 'prod':
                return new ConfigProd();
        }
    }
}
```
If we need production configuration then we pass string `prod` to factory method and we get production configuration. This same for develop environment.
```php
$configProd = (new ConfigFactory())->createConfig('prod');
$configDev = (new ConfigFactory())->createConfig('dev');
```

So it's all.


Logic in the factory can be more complicated but we don't need to worry about this. We only take configuration where we need it.

P.S.
It's hard to find a good example. If you have good let me know in comments. Thanks.

Source:
https://medium.com/nestedif/java-simple-factory-pattern-9c2538dd0265

Source code:
https://github.com/lasotaartur/design-patterns/tree/master/Creational/SimplyFactory
Unit Testing Mock Dependency Calls
Tags: discuss, javascript, unittest, testing
Published: 2019-06-27 12:03:04

---
title: Unit Testing Mock Dependency Calls
published: true
description: 
tags: discuss, javascript, unit test, testing
---

So me and a colleague are busy going through the unit testing motions. Let me set up 2 scenario's:

# Scenario 1

- There are two services. *Service one* has a dependency on *service two*.
- A method call in *service one* returns a value but also calls a method from *service two*, while passing values to that method (*Service two* does not return any value).

# Scenario 2

- There are two services. *Service one* has a dependency on *service two*.
- A method call in *service one* returns a value but also calls a method from *service two*, while passing values to that method.
- Service two method has a return value that directly affects the return result of *service one*.

# Testing Scenarios

With **scenario one** I would argue that you would first stub the *service two* dependency. Then ensure that the value passed to that stub are what you would expect. The reason being you are ensuring that the outside dependency is passed what you expect and called, as you should have no direct knowledge of what it does with it.

However with **scenario 2**, my argument is you would stub *service two* dependency. However you would have no need to make sure that the method was called or what it was called with. You would however make sure it was called if it was down a certain branch of logic. However since you are directly determining the return value of the *service two* method you are testing your scenarios specific to that unit test. If you wanted to know what was being passed into that method and result then you are either looking at the need to refactor your code or you are needing to make a unit test and integration test scenario.

I would just like to get peoples opinions on this and how they approach it.
Jack Of All Trades or Master of One?
Tags: career, discuss
Published: 2019-06-27 10:59:18

---
title: Jack Of All Trades or Master of One?
published: true
description: That age old question: how many pies should one have a thumb in?
tags: career, discuss
cover_image: https://thepracticaldev.s3.amazonaws.com/i/o8ehqz2icztagq32jayg.jpg
---
One of these days, I'll write a Dev.to article that isn't just thought dumping onto a page. However, today is not that day!

I pride myself on being a sponge for knowledge. Recently, however, I've been taking a little break from reading around and trying new languages to give my brain a well-earned pitstop. Picture my brain somewhere warm and sunny, with its sandal-clad feet propped up in a deck chair and a glass of ice-cold lemonade getting it's hand slick with condensation. (Do not question how my brain developed limbs and apparently a working digestive system.)

Whilst taking a few days to myself, a question appeared in my head that I've been unable to shake: is all of this extra learning doing me any good?

The more I read about interview practices and techniques, I realise how much I flounder when asked technical questions by people who purport to know a great deal more than me. The thought of going into interviews and being quizzed on my abilities makes me incredibly nervous. 

Now some of this can be put down to imposter syndrome, of course, but I must also accept a degree of responsibility . I'm a lot more confident in my programming abilities than I was two years ago but still know that I might not appear the most proficient when quizzed in a time-sensitive situation.

I've also never truly known what I've wanted to do. 

For instance, I love video game design and Development - because I love stories and characters and art and music. I want to be part of the process that brought my favourite games before me. 

I also love web development. The feeling I get when I've designed a beautiful and responsive site that is also accessible and functional? I imagine it's how a peacock feels when they've just had their feathers done at the local peacock salon.

Software engineering gives me great joy too. Mobile apps, web apps, programs - you name it, I want to know how to make it!

I have something of a childlike wonder for creation, for making things and being able to say 'look, I did this!'

But where does it end? Where do I stop and realise I have to settle for one?

How long before my 'breadth of knowledge' begins to be described as a 'lack of advanced expertise'?

Has anybody ever had the same dilemma? Whether it's about you or a colleague, friend, or family member: I'd love to hear your thoughts. No matter what side of the interview table you were on, how do you handle this type of CV?
How to make scrollable NSTextView in AppKit
Tags: swift, appkit, macos, nstextview
Published: 2019-06-27 10:11:58

---
title: How to make scrollable NSTextView in AppKit
published: true
description: 
tags: swift,appkit,macos,nstextview
---

When adding `NSTextView` in xib, we see it is embedded under `NSClipView`. But if we try to use `NSClipView` to replicate what's in the xib, it does not scroll. 

To make it work, we can follow [Putting an NSTextView Object in an NSScrollView](https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/TextUILayer/Tasks/TextInScrollView.html) and [How to make scrollable vertical NSStackView](https://github.com/onmyway133/blog/issues/173) to make our `ScrollableInput`

For easy Auto Layout, we use [Anchors](https://github.com/onmyway133/Anchors) for `UIScrollView`. 

Things worth mentioned for vertical scrolling

```swift
textContainer.heightTracksTextView = false
textView.autoresizingMask = [.width]
textView.isVerticallyResizable = true
```

```swift
class ScrollableInput: NSView {
    let scrollView = NSScrollView()
    let textView = NSTextView()

    override init(frame frameRect: NSRect) {
        super.init(frame: frameRect)

        let rect = CGRect(
            x: 0, y: 0,
            width: 0, height: CGFloat.greatestFiniteMagnitude
        )

	let layoutManager = NSLayoutManager()

        let textContainer = NSTextContainer(size: rect.size)
        layoutManager.addTextContainer(textContainer)
        textView = NSTextView(frame: rect, textContainer: textContainer)
        textView.maxSize = NSSize(width: 0, height: CGFloat.greatestFiniteMagnitude)

        textContainer.heightTracksTextView = false
        textContainer.widthTracksTextView = true

        textView.isRichText = false
        textView.importsGraphics = false
        textView.isEditable = true
        textView.isSelectable = true
        textView.font = R.font.text
        textView.textColor = R.color.text
        textView.isVerticallyResizable = true
        textView.isHorizontallyResizable = false

        addSubview(scrollView)
        scrollView.hasVerticalScroller = true
        scrollView.drawsBackground = false
        scrollView.drawsBackground = false
        textView.drawsBackground = false

        activate(
            scrollView.anchor.edges
        )

        scrollView.documentView = textView
        textView.autoresizingMask = [.width]
    }

    required init?(coder decoder: NSCoder) {
        fatalError()
    }
}
```

---

Original post https://github.com/onmyway133/blog/issues/330
I have no idea what I'm doing, but here Goes #3 IT WORKS!!
Tags: beginners, node, blog, codenewbie
Published: 2019-06-27 08:51:52

---
title: I have no idea what I'm doing, but here Goes #3 IT WORKS!!
published: true
description: a journey of awareness
cover_image: https://thepracticaldev.s3.amazonaws.com/i/6qm659emm1tiydhhsbwu.PNG
tags: #beginner #discuss #node #blog #codenewbie
---
Phew! It actually works. Well, very roughly. 

*If you've not been following along: 1. Shame on you. 2. To learn Node, I've decided to build an API that automatically chases freelance work for me*.

So where were we? trying to get *anything* out of Google Calendar and make a JSON. That was done, the only problem was - the way it iterated changed the data enough to be a pain when that same data needed to be interpreted. So the challenge was to leave to data extracted by the Google API unchanged, and change it when it needed to be processed, without destroying the original object/s. That way, any part of it can be used in any way, as required. Don't know if that's the right approach, but if felt good to me. And that's all that's important, right?

[The github repo has the files](https://github.com/jamonjamon/twc2k).

The major nightmare I had was understanding the function below. I thought it returned and array... but it wasn't was it? It was iterating (wasn't it?) through every event and pushing them/console.logging them one at a time. I think? Don't mistake my confusion for confusion. Sheer terror is a better description. Anyways, I figured that if I pushed them into an array, that might be an idea, and it seemed to work. I'll take that.

<pre>
    if (events.length) {      
      events.map((event, i) => {
        const start = event.start.dateTime || event.start.date;
        cleanDate = start.slice(5, 10);
        //calData(start);
        array.push(cleanDate);
        //console.log(`${start} - ${event.summary}`);
        //calData(cleanDate);
      });
</pre>

From there I just needed to manipulate the data, to group days with months and then write an if statement to send string/s when conditions were met. And hey presto! A robot!

I showed it to one of my broadcast friends, and he LOST HIS MIND. "NO WAY! It can do that??" 

Yes, Simon. Yes. It. Can. Simon now thinks I'm a genius. I'll take that. It's all about the bullshit factor, isn't it?

Closing shout out:
On the [last post](https://dev.to/jamonjamon/i-have-no-idea-what-i-m-doing-but-here-goes-2-yay-json-5fk) I got some great advice from Neil Green. Many thanks for the tips, they were greatly appreciated. The debugger in VScode has blown my mind. Woah!!! How good is a bit of degugging??!!!

Next up: Join this to gmail, and send an email. Oooooooooo. Fun times ahead.



For those that haven't been playing along: 
[Episode 0](https://dev.to/jamonjamon/i-have-no-idea-what-i-m-doing-but-here-goes-0-4ffl)
[Episode 1](https://dev.to/jamonjamon/i-have-no-idea-what-i-m-doing-but-here-goes-1-decision-time-cp2)
[Episode 2](https://dev.to/jamonjamon/i-have-no-idea-what-i-m-doing-but-here-goes-2-yay-json-5fkb)
What are the Online Tools you use.
Tags: discuss
Published: 2019-06-27 08:36:02

---
title: What are the Online Tools you use.
published: true
tags: discuss
---

I'm building something for the Developer & Designers.

Please let me know your favorite Online Tools you use in your daily life.

I use GitHub, CodePen, GetMakerlog,  Twiter, Dribble, Behance, dev.to, NPM, Medium, YouTube, IG.

Thanks ❤️
5 Trends in Artificial Intelligence to watch in 2019
Tags: ai
Published: 2019-06-27 08:28:34

AI technologies are some of the most complex and exciting topics for the new year. We have put together our list of the 10 best Artificial Intelligence trends for 2018.

1- Automatic Learning

Machine learning (ML) is the branch of artificial intelligence that focuses on equipping machines with the ability to learn without intervention or human programming. There are currently several types of machine learning platforms available for companies and companies to start taking advantage of AI. 

The different approaches to machine learning will probably be common throughout 2019 since hybrid and deep learning models combine to take uncertainty into account and model it. Cloud-based and edge-based machine learning platforms are also likely to be more prolific and will be widely adopted throughout 2019.

2- Deep Neural Networks and Theory of Deep Learning

Deep neural networks (DNNs) are artificial neural networks that contain multiple hidden layers between their input and output layers, sometimes called "stacked" neural networks. Deep learning is revolutionizing the AI industry

Deep learning is the branch of <a href="https://www.techmediatoday.com/what-is-machine-learning/">machine learning</a> that deals with representations of learning data instead of task-specific algorithms. Despite its long-standing use, DNNs and the theory of deep learning have remained largely in the mystery of the experts.


3- Interaction with the Client

The use of artificial intelligence for customer interaction has already become one of the most popular applications for artificial intelligence and ML technologies, and it is likely that this trend will continue in 2019 with more products and potential applications available with the weather. According to Gartner, more than 80% of all customer interactions will be managed by an IA for the year 2020.

4- The Internet of Intelligent Things

To make the concept of the smart city a reality, IoT devices will have to be smart enough to function and be maintained without the need for human intervention. The <a href="https://www.techmediatoday.com/internet-of-things-trends-that-will-drive-business-innovation/">IoT Long boom</a> will continue for the next Ten Years of Market Development. The widespread adoption of AI technologies, together with the continuous expansion of the Internet of objects, will begin to build on the technological foundations established by the previously associated technologies.

5- AI as a Standard in the Workplace

There are already a large number of businesses and companies within a wide variety of industries around the world that are now turning to artificial intelligence and machine learning technologies to perform a myriad of different functions and applications in the workplace. With a growing product base and many more innovations on the horizon, 2019 could also be the year in which artificial intelligence becomes a daily technology for a large number of companies and organizations.
Writing HTML in Markdown
Tags: html, writing
Published: 2019-06-27 08:20:29

This is a very quick comment about this [interesting blog post](http://john.ankarstrom.se/html/) about CMS and site generators that I saw this morning in the [WebOps Weekly](https://webopsweekly.com) newsletter. 

It totally makes sense: either you can write with a WYSIWYG editor like [Seamonkey](https://www.seamonkey-project.org/), or write in Markdown and just convert to HTML with [Pandoc](https://pandoc.org/getting-started.html) using a oneliner:

    pandoc 2019-06-27.md -f markdown -t html -s -o 2019-06-27.html

And then, just trash the whole thing to your website.