teleren/devto huggingface dataset:
(not very) Deep Learning
Tags: youtube, computerscience, ai, machinelearning
Published: 2017-09-22 21:01:14

---
title: "(not very) Deep Learning"
published: true
tags: youtube,computer-science,artificial-intellige,machine-learning
canonical_url: https://medium.com/@andrew_subarctic/not-very-deep-learning-618f92b13487
---

Tensorflow is not a unicorn, its just another&nbsp;tool

For the last year I’ve been playing around with different algorithms for playing ATARI games through the OpenAI platform. The nice thing about these games is that all actions (or inaction) are deterministic. If you make all the same choices then you will get the same&nbsp;result.

So far the best performance I’ve found is the A3C algorithm. A3C is similar to DQN however it uses many similar variants of the same strategy to learn what actions or insights have large impacts on value or what information can be safely ignored. This is good enough to solve a few of the simpler problems, however it fails to gain any deeper insight into complex environments with specific trouble at object recognition.

A good example is the ATARI River Raid environment. Here is one of my A3C bots&nbsp;playing:

{% youtube a4wxAWY-Dgk %}

If you watch the clip you will see that the bot adopts the basic strategy of “avoid obstacles and keep shooting”. This would be a good strategy if not for the concept of â€˜fuel’ that the game creates. In order to progress further in levels there is a deferred need to 1) not shoot the fuel cartridges and 2) collect them by touching them. The problem is that there is no near-term penalty to ignoring the fuel charges, and thus the agent never learns that they are important. This bot has been fairly well trained, so I would suspect that more training would not help this problem much. It is fundamentally a problem of breadth vs depth of value&nbsp;search.

What I would like to see more in the AI research space is methods that combine Object and Feature Recognition with Policy Reinforcement Learning. This combination would help simplify these game environments and help the agent cut through the immense redundancy in each environment. Atari games are not like Go. Each pixel is not critically important. Usually objects are larger sprites with the exception of bullets and&nbsp;flak.

So that is where I am stuck right now. I will be trying to do some studying of object recognition myself and see if I can rectify that research with the policy learning side. Hopefully we will see deeper soon, the current pace is encouraging.
APIs for dummies. Let's discuss!
Tags: api, discuss
Published: 2017-09-22 16:04:07

---
title: APIs for dummies. Let's discuss!
published: true
description: 
tags: APIs, discuss
---

I was recently asked to be a speaker at a first meetup organized by a group of enthusiastic women that indirectly work with IT, understand that IT is becoming the core of everything we do and would like to learn more about this.

My plan is to talk about IT Systems, the importance of Integration and APIs.

Do you have any suggestions on how to best explain these concepts and/or talks/articles around it?

Moreover, depending on the time allocated for the talk, I might also go for a lightweight demo. The programming laguage used should be something super simple and friendly for non-techincal eyes! Any ideas?

Thanks a million for your comments! ðŸ˜Š
What made you switch your main programming language?
Tags: discuss, career, programming
Published: 2017-09-22 14:40:32

---
title: What made you switch your main programming language?
published: true
description: What made you switch focus? What were the caveats?
tags: discuss, career, programming
---

This post's goal is to share experience, telling a bit of your story and helping people who are in doubt.

What made you switch your main programming language?
Quick poll re: API docs
Tags: api, documentation, survey, discuss
Published: 2017-09-22 14:39:18

---
title: "Quick poll re: API docs"
published: true
description: Survey about API docs implementation details
tags: #api #docs #survey #discuss
---

When you read API docs, you obviously need to know inputs and outputs of any method you want to call.

To what extent do you care about the implementation of the method? To what extent are you happy to leave it as a black box? In your experience, does it depend on the kind of language or application you are working with?
Custom Website Design vs Template Website Design - [Infographic] 
Published: 2017-09-22 09:36:25

---
title: Custom Website Design vs Template Website Design - [Infographic] 
published: true
description: This infographic explains why opting for a custom website design is a smarter choice instead of pre-made templates.
tags: 
---

The middle east has a predominantly cash-based economy. Majority of payments in the UAE are made in cash rather than online transactions. With nearly half of the world population estimated to be internet users, Dubai has decided to hop on the band wagon and make its mark in the world of ecommerce. Dubai, being the second largest emirate and having a central location as well as an open economy, is guaranteed to flourish in the trade market.  Since Dubai is home to high tourism activity and a wide variety of businesses, it has great potential for becoming a booming e-commerce hub. Most businesses online are using [SEO optimized website](https://www.go-gulf.ae/seo-dubai.php) to extend their reach to target audiences. Since, web design is considered a key instruments in the success of an online business, choosing between a pre-made template and a custom design can be a defining moment for the overall effectiveness of the website.The following [infographic](https://www.go-gulf.ae/blog/custom-web-design-vs-website-templates/) compiled and designed by GO-Gulf clearly explains why opting for a custom web design is a smarter choice. 

![web design vs web templates](https://www.go-gulf.ae/wp-content/uploads/2016/07/custom-web-design-vs-website-templates.gif)

A custom made web design can be optimized according to the brand, business goals and visitor needs. A greater user experience can be generated with a website designed specifically for the target audience rather than using a template designed for the general audience. Furthermore, a custom built website has proven to last twice the lifespan of a template i.e. a custom design has been calculated to last up to 3 years while in comparison a template lasts up to 1.5 years. Custom built web designs often come along with a built in SEO support system, which a template often lacks. Due to this factor, a template requires a higher SEO investment in the long run, inevitably increasing the overall project costs. In the end, it all comes down to the ROI. Custom websites have consistently proven to provide a higher return on investment whereas templates often do not have the capacity to generate significant business resulting in a low ROI. Custom built websites have a tailor-made CMS that is capable of further expansion without risking your security, a feature which a pre-made template usually lacks.
Scaffolding: Another Benefit of Clean Code
Tags: software, clean, code
Published: 2017-09-24 01:54:57

---
title: "Scaffolding: Another Benefit of Clean Code"
published: true
tags: software,,clean,code
canonical_url: 
description: You’ve been asked to build a particular feature that depends on someone else’s work. Maybe that work is happening within your team, maybe not. Either way, it needs to be done as quickly as possible. What do you do?
---

Imagine this scenario: you’ve been asked to build a particular feature that depends on someone else’s work. Maybe that work is happening within your team, maybe not. Either way, it needs to be done as quickly as possible. What do you do?

This has happened to me more than once in the past few weeks. My solution?

_Don’t worry about it. Just write good code around it._

Two clean coding practices in particular can help us:

- Breaking things into small pieces: This makes it easy to isolate implementation you don’t have yet, whether you need it from someone else or you simply haven’t figured out how to do it yet.
- ‎Testing: code that’s broken into smaller, independent, more manageable pieces is also easier to test, both in isolation and integrated. This way, when new code shows up, you can test it quickly and have confidence that it’ll play nicely with your existing work.

Lots of CLI tools (ex. Angular CLI, Rails generators, etc.) already scaffold around code you don’t have yet. Why don’t you do the same thing yourself?
Do you (re)arrange your class methods? Why?
Tags: discuss
Published: 2017-09-21 16:31:20

---
title: Do you (re)arrange your class methods? Why?
published: true
tags: discuss
---

Lots of (open-source) libraries I go through seem to (re)arrange the methods of member classes in a specific manner e.g. such that any class methods that are to be used by other methods within that class are defined first.

For example:

```php
<?php
class Dispatcher
{
    public function isDispatchable()
    {
        $number = rand(0, 200);

        return ($number < 100) ? true : false;
    }

    public function dispatch()
    {
        if ($this->isDispatchable()) {
            // implementation goes here...
        }
    }
}
```

Here, `isDispatchable()` is defined before the method that uses it.

I generally just append new methods to the end of the class whether or not the other methods that use it are above or below. Should I be sent north of the wall?

What do you do?
AWS Training in Hyderabad
Tags: awscourse, awstraining, awsinstitute
Published: 2017-09-21 10:56:36

---
title: AWS Training in Hyderabad
published: true
description: 
tags: aws course, aws training, aws institute
---
<b>Unlimited opportunities in AWS</b>
There is a high ongoing demand across the industry sector for the best-skilled professionals with the best skillful knowledge regarding the different advanced technical concepts. Also, in relevant to the demand across the industry more number of people are nowadays getting themselves trained to perfection in different spheres of technical aspects. And in order to make yourself stay competitive and attain the best opportunities for your career development, getting enrolled for the AWS Training will be a perfect choice. Also, one can find number of training institute offering the best career oriented <a href="http://www.orienit.com/courses/aws-training-in-hyderabad" target="_blank">AWS Training In Hyderabad</a>. Among them, the Orien IT AWS training institute is well renowned for its excellent training program.  There is extensively higher demand for the professionals who are well skilled in handling the AWS working functionalities.
  
About AWS:
Amazon Web Services which is in short referred to as AWS is one among the revolutionary innovations of the 21st century made in the field of cloud computing. Developed by the Amazon company the AWS offers the highly reliable and well precise cloud based services. Making effective use of AWS will result in yielding a higher return on investments. This helped in extending the demand for the AWS based services across the industry taking it far ahead of a lot of advancements and further innovations owing to its high investments.
Only code goes into a repository, right?
Tags: discuss, dev, webdev
Published: 2017-09-21 09:22:05

---
title: Only code goes into a repository, right?
published: true
description: Where to put all the other stuff?
tags: #discuss #dev #webdev
---

I was wondering how you deal with API keys, config files, precompiled binaries, test data or other environment specific data or data that is too large? Also, those Word documents, PDFs and Emails, that should be kept too.

If it is a small project, the easiest would be to commit almost everything to the repository, and keep some of my files in other places like Dropbox or Google Drive or just simply save them on the local hard drive. But this does **not** scale to larger projects or projects where more people are involved.

There has to be a better way. Is there? How do you manage your files?
A small refactoring example
Tags: php7, oop, cleancode, beginners
Published: 2017-09-21 09:10:38

---
title: A small refactoring example
published: true
description: A short example how to use the typehinting features of php and write better code
tags: PHP7, OOP, clean-code, beginners
---

I'm currently reviewing a small piece of code of a new co-worker. As he comes back to work next week I will share a small example how to refactor the code here, so I won't forget to mention it to him.

I found this:

```php

...

foreach ($p->mProductUnits as $unit) {
	$ret .= hHtml::Clear();
	$ret .= $this->RenderInfoRow(
		$unit->showUnit(),
		$unit->RenderPriceWithCurrency(),
		$unit->AvailabilityMessage()
	);
}

...

private function RenderInfoRow($name, $price, $availbility){
		
	return
		'<div class="col-l-4 col-m-4">'.$name.'</div>'
		.'<div class="col-l-2 col-m-2">'.$price.'</div>'
		.'<div class="col-l-4 col-m-4">'. $availbility.'</div>';

}

```

What problems do we have here? Hungarian notation? Well, yes, but that is my fault and is due to the framework i wrote. Besides that?

Wright. The single responsability principle is hurt. Also Uncle Bob teached us, that one parameter to a function is ok. In this example it is absolutely possible to use only one parameter to the function RenderInfoRow()
So lets see how this gets refactored in a first step:


```php

foreach ($p->mProductUnits as $unit) {
	$ret .= $this->RenderInfoRow($unit);
}

private function RenderInfoRow(oProductUnit $u) {

    return
	hHtml::Clear()
	. '<div class="col-l-4 col-m-4">' . $u->showUnit() . '</div>'
	. '<div class="col-l-2 col-m-2">' . $u->RenderPriceWithCurrency() . '</div>'
	. '<div class="col-l-4 col-m-4">' . $u->AvailabilityMessage() . '</div>'
    ;

}

```

This has more than one advantages. First: It's easier to read and less to write. But second (and in this case maybe more important): Now the IDE knows, that $u is of the type oProductUnit. So now you don't have to open the class to see the function-names. You get them presented as soon as you type $u in the function.
Bubble Sort in Ruby
Tags: ruby, beginners
Published: 2017-07-28 18:00:36

---
title: Bubble Sort in Ruby
published: true
description: Simple and old bubble sort in Ruby
tags: ruby, beginners
---

![](https://cdn-images-1.medium.com/max/800/1*m7BLDQIGM7QZNJLJWk-PoA.png)

*Original publication: [Seis Algoritmos en Ruby](https://medium.com/@kinduff/seis-algoritmos-fundamentales-en-ruby-520bbef8a6f3) - [@Kinduff](https://medium.com/@kinduff)*

It is the most basic way of arranging a collection. It iterate on every value and it compares with the following one, they are exchanged of being necessary, the iteration repeats itself until all the values are not exchangeable.

```ruby
def sort(values)
  length = values.size - 2
  swapped = true

  while swapped
    swapped = false

    0.upto(length) do |i|
      if values[i] > values[i+1]
        values[i], values[i+1] = values[i+1], values[i]
        swapped = true
      end
    end
  end

  return values
end

sort([7, 4, 5, 2, 9, 1])

# =>
# 7, 4, 5, 2, 9, 1
# 4, 5, 2, 7, 1, 9
# 4, 2, 5, 1, 7, 9
# 2, 4, 1, 5, 7, 9
# 2, 1, 4, 5, 7, 9
# 1, 2, 4, 5, 7, 9
```

### ;)
{% youtube lyZQPjUT5B4 %}
Rendering Markdown in Xcode 9
Tags: xcode, markdown, swift, ios
Published: 2017-09-21 04:12:01

---
title: Rendering Markdown in Xcode 9
published: true
description: Guide to render standalone Markdown files in Xcode 9.
tags: xcode, markdown, swift, ios
---

Recently while exploring Apple's new sample projects for iOS 11, I stumbled upon this sample [ARKit project](https://developer.apple.com/sample-code/wwdc/2017/PlacingObjects.zip). Aside from the cool ARKit stuff going on, I saw how the README.md would actually get rendered. 

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


This has been possible in Playgrounds for a while but never in an actual Xcode project, until now. This markdown rendition is different from the one advertised, where the Markdown is partially rendered and the syntax is included (see image below).
![](https://thepracticaldev.s3.amazonaws.com/i/y7b0k3blno9kvq0urncu.png)


After some "extensive" research and excavation I found that `.xcodesamplecode.plist` is what triggers Xcode to render the Markdown as seen in their sample. This file can be found under the `.xcodeproj` (within Package Contents). 

![](https://thepracticaldev.s3.amazonaws.com/i/39z1rz97zgxeqo31b7hz.png)

It seems Apple intended for Markdown files to be rendered only if they are under a sample project. Ideally there would be a way to toggle when it renders, similar to Playgrounds, but for now the simplest way is to drop the `.xcodesamplecode.plist` file under your `.xcodeproj` project.
After dropping `.xcodesamplecode.plist` under the TestProject.xcodeproject I created it now renders the Markdown as expected. [Download `.xcodesamplecode.plist` here](http://danielinoa.com/assets/xcodesamplecode.plist.zip).

TADA!!!
![](https://thepracticaldev.s3.amazonaws.com/i/9tcv1rr0s8rx5xgafr3s.png)


I think having renderable README.md files within Xcode could go a long way in helping make large projects easier to document and unpack, without the need to have external Markdown renderers. In addition to code comments this could greatly improve discoverability for new people coming into your project, as long as your project is well structured.

Thanks for reading!

Questions about any of this? Ask me on [Twitter](https://twitter.com/danielinoa_).

*This post was originally published on [danielinoa.com](http://danielinoa.com/xcode/2017/09/19/markdown-in-xcode9.html)*
Are computers faster than the human brain?
Tags: psychology, deeplearning, ai, gametheory
Published: 2017-09-21 17:22:35

---
title: "Are computers faster than the human brain?"
published: true
tags: psychology,deep-learning,artificial-intellige,game-theory
canonical_url: https://medium.com/@andrew_subarctic/are-computers-faster-than-the-human-brain-2890edf7c95f
---

Well, it depends what you are measuring&nbsp;…

There [have](https://spectrum.ieee.org/tech-talk/computing/networks/estimate-human-brain-30-times-faster-than-best-supercomputers) [been](https://www.scientificamerican.com/article/computers-vs-brains/) [many](http://bgr.com/2016/02/27/power-of-the-human-brain-vs-super-computer/) [attempts](https://www.forbes.com/sites/quora/2016/03/02/how-powerful-is-the-human-brain-compared-to-a-computer/#658e7d86628e) to quantify the question of whether brains or machines are faster, however the results are apples and oranges. To really communicate the difference there needs to be some commonality to which we can compare. There are several ways we can test processing speed, so let’s jump&nbsp;in.

For starters we can look at something unfair for humans: arithmetic. A good fifth grader should be able to answer addition, subtraction, and multiplication tables at a rate of about one answer per second. A 1GHz computer, like your old cellphone, can do a billion per second. So clearly conscious arithmetic is not our strong&nbsp;point.

However, let’s turn that number on its face: how many operations per second does our brain do in our subconscious visual cortex? If you imagine a 3D figure and rotate, zoom, or transform it, you should find that it isn’t that hard and it all happens in realtime. The Graphics Processing Unit of the human imagination still puts high-end computer GPUs to shame. This is strange though, there are only [~140 million neurons](https://en.wikipedia.org/wiki/Visual_cortex) on each lobe of the visual cortex, however there are over [30 billion transistors](https://en.wikipedia.org/wiki/Transistor_count) on the latest processors. Clearly our brains are more efficient at this sort of processing, but is that fair to compare hardware without attention to software.

So we see that humans are in fact running on out-of-date hardware, but we are much more efficient where it counts. Today’s computers on the other hand are beastly machines, but the software/hardware mix is very inefficient and slow. The result is that humans still have a significant processing advantage in areas that we have already adapted to. For other games that don’t come naturally to us, we are outmatched. For all [deterministic games of historical significance](https://qz.com/993147/the-awful-frustration-of-a-teenage-go-champion-playing-googles-alphago/), humans play orders of magnitude less proficiently than modern&nbsp;AIs.

![](https://cdn-images-1.medium.com/max/400/1*0A72T-1-CFRhDE5I-8pmPQ.png)
Can flutter be an alternative to react-native ?
Tags: reactive, javascript, mobile, techtalks
Published: 2017-09-20 23:06:16

---
title: Can flutter be an alternative to react-native ?
published: true
description: 
tags: reactive, javascript, mobile, techtalks
---

Skip to 18:39 for some of the cool stuff - hot reload, debug render, stateful hot reload (this is really cool) etc.

{% youtube prlK_QL_qOA %}
Your README Is Important
Tags: notes, webdev
Published: 2020-01-06 21:19:08

---
title: Your README Is Important
published: true
date: 2017-09-20 20:57:08 UTC
tags: Notes, Web Development
canonical_url: https://www.markhesketh.com/your-readme-is-important/
---

Good documentation is very important and expected of open-source projects.

We should hold our private projects to the same standard. The `README` is not a `@todo`. It should be available and up to date, even if only for our own benefit.

## But why?

It might sound like a waste of time to document something you’ve made for yourself but you’d be mistaken.

> The faintest ink is more powerful than the strongest memory.

I’ve lost count of the number of times I’ve picked up an old client’s project and been thankful I’d included a `README.md`. I’d taken the 5 minutes to document the setup steps, and can now onboard myself even several years later. Instead of trying to remember my workflow of years gone by, the instructions are right there.

What seems obvious now, may not be later.

### Practice makes perfect

Writing concise documentation is a worthwhile skill and you should practice whenever possible. Using the documentation on your personal projects is the perfect opportunity.

This practice will benefit you and others when documenting public or team projects.

Good documentation can be the difference between a project succeeding or not. Personally, I’ll skip any project that does not have clear and concise documentation.

Hone your documentation skills and give personal projects their best chance to succeed.

## Where to start?

Dig into your projects folder, find a project that is missing a `README.md` and get to work. Your future-self will thank you.

For tips on writing your README, refer to Eric Barnes’ great article on [how to write a README that rocks](https://m.dotdev.co/how-to-write-a-readme-that-rocks-bc29f279611a).