teleren/devto huggingface dataset:
Top 12 Repositories on github â€ to me’ (september 2017)
Tags: github, repositories, projects
Published: 2017-10-01 00:06:19

---
title: Top 12 Repositories on github â€˜to me’ (september 2017)
published: true
description: 
tags: github, repositories, projects
---
<ol>
	<li>
<h3><a href="https://github.com/ncase/trust"><span class="text-normal">ncase /Â </span>trust</a>
An interactive guide to the game theory of cooperation</h3>
</li>
	<li>
<h3><a href="https://github.com/jeromeetienne/AR.js"><span class="text-normal">jeromeetienne /Â </span>AR.js</a>
Efficient Augmented Reality for the Web - 60fps on mobile!</h3>
</li>
	<li>
<h3><a href="https://github.com/iliakan/javascript-tutorial-en"><span class="text-normal">iliakan /Â </span>javascript-tutorial-en</a>
Modern JavaScript Tutorial</h3>
</li>
	<li>
<h3><a href="https://github.com/toddmotto/public-apis"><span class="text-normal">toddmotto /Â </span>public-apis</a>
A collective list of public JSON APIs for use in web development.</h3>
</li>
	<li>
<h3><a href="https://github.com/EbookFoundation/free-programming-books"><span class="text-normal">EbookFoundation /Â </span>free-programming-books</a>
ðŸ“šÂ Freely available programming books</h3>
</li>
	<li>
<h3><a href="https://github.com/sdmg15/Best-websites-a-programmer-should-visit"><span class="text-normal">sdmg15 /Â </span>Best-websites-a-programmer-should-visit</a>
ðŸ”—Â Some useful websites for programmers.</h3>
</li>
	<li>
<h3><a href="https://github.com/christopherjenness/NBA-player-movement"><span class="text-normal">christopherjenness /Â </span>NBA-player-movement</a>
Visualization and analysis of NBA player tracking data</h3>
</li>
	<li>
<h3><a href="https://github.com/papers-we-love/papers-we-love"><span class="text-normal">papers-we-love /Â </span>papers-we-love</a>
Papers from the computer science community to read and discuss.</h3>
</li>
	<li>
<h3><a href="https://github.com/kamranahmedse/developer-roadmap"><span class="text-normal">kamranahmedse /Â </span>developer-roadmap</a>
Roadmap to becoming a web developer in 2017</h3>
</li>
	<li>
<h3><a href="https://github.com/Hack-with-Github/Awesome-Hacking"><span class="text-normal">Hack-with-Github /Â </span>Awesome-Hacking</a>
A collection of various awesome lists for hackers, pentesters and security researchers</h3>
</li>
	<li>
<h3><a href="https://github.com/jiahaog/nativefier"><span class="text-normal">jiahaog /Â </span>nativefier</a>
Make any web page a desktop application</h3>
</li>
	<li>
<h3><a href="https://github.com/kdn251/interviews"><span class="text-normal">kdn251 /Â </span>interviews</a>
Everything you need to know to get the job.</h3>
</li>
</ol>
Â
On coding challenges.
Tags: discuss, interview, careeradvice
Published: 2017-09-30 21:14:02

---
title: On coding challenges.
published: true
description: Is it worth it to do coding challenges or do they feed into a broken system?
tags: #discuss #interviews #careeradvice
---

As a dev candidate who's been unemployed for a while now, I see a lot of companies wanting you to take these timed tests to implement some challenge or algorithm. These have been criticized for not meaning much.
And I myself am not sure if I want to feed into a culture that perpetuates this kind of meaninglessness, however, should I bite the bullet for the sake of a job or hold out on principal?
How To Code: Simple Data
Tags: p1xtguides, learntocode, racket
Published: 2020-01-14 00:07:01

---
title: How To Code: Simple Data
published: true
date: 2017-09-30 19:01:22 UTC
tags: p1xt-guides,learn-to-code,racket
canonical_url: 
---

Well I’ve been a bit lazy with the updates, but in the last two weeks I have finished the entirety of HtC: SD on edx.

![](https://cdn-images-1.medium.com/max/374/1*yUq5MZGEfMybrHqcxhtxGA.png)<figcaption>Invasion!</figcaption>

I’ll continue where I left off in my last post: Week 4 focused on self-reference and reference. Self-reference means when a data definition refers to itself, then the template for that function must include a “natural recursion.” The primary type of self-referential data we work with is Lists (remember car and cdr), where an list can either be empty or a pair of items, where the second item is another list. Therefore, naturally, to work on this type of data we need some recursive function. I have worked with recursion a bit (a very tiny bit) but I enjoyed this approach to teaching it. Solving problems with recursion can be a bit tricky, which is why “well formed” tests will help your development.

Reference (as opposed to self-reference) means when a data type contains another type of data that is non-primitive. For example, a List of Bears, each item can be a Bear (which would be some other structure). The point is, if we refer to a non-primitive data type, we need to include reference to that data type’s template into the new template. It’s a bit less confusing than it sounds. If you have a list of x,y pairs, and you want to adjust every point in the list, you’ll need a function that operates on a single point itself. This lends itself to the Helpers module.

A helper function, simply, does a small part of a function. You can use helpers for function composition (remember JS Allonge?) or when the “knowledge domain” changes. Many many helpers might be needed for large or complex problems. Helper functions make debugging and keeping track of the flow of information much easier.

The course also touched on Binary Search Trees, which is vaguely familiar form CS50 (though I believe that was just binary search, and search trees/tries were separate). To be honest I struggled a bit with these, a few problems in the problem set tricked me up (partially due to misunderstanding the problem statement)

The final project of the course Space Invaders was a fun opportunity to combine everything I’d learned. A lot LOT of helper functions, test-driven design, breaking down a problem into sub-problems. I am quite proud of my little result. The code is somewhere on github but I’m not going to post it as maybe you haven’t finished the course yet!

I super recommend this course, it is not the most challenging (like CS50 was for me) but it teaches a lot of broadly applicable lessons in CS. The followup, HtC: Complex Data, is supposed to be much tougher! Let’s go!
happiness is when your pull request is merged :3
Tags: coding, github
Published: 2017-09-30 16:53:52

---
title: "happiness is when your pull request is merged :3"
published: true
description: ######happiness is when I get such notifications [I'm an inline link](https://github.com/LewisVo/Awesome-Linux-Software/pull/249) {% github https://github.com/LewisVo/Awesome-Linux-Software/pull/249#issuecomment-333313431 %}
tags: coding, github
cover_image: https://thepracticaldev.s3.amazonaws.com/i/x6et0kehfumy9guvbwrg.jpg
---
Summarize on “Spring Microservices” book by Rajesh RV
Tags: kubernetes, microservices, springcloud, books
Published: 2018-03-03 08:54:31

---
title: "Summarize on “Spring Microservices” book by Rajesh RV"
published: true
tags: kubernetes,microservices,spring-cloud,books
canonical_url: 
---

Recently I’ve read **“Spring Microservices”** book by **Rajesh RV** and here I want to try to summarize it. The book was published in June 2016. But, it seems, it is still relevant.

![](https://cdn-images-1.medium.com/max/500/1*sxES4bQ1vbo2PoXbTjJdVA.jpeg)

#### Microservices isn’t just for developers pleasure but also business&nbsp;demand.

Yes, sure, it’s extremely interesting and fun to plan and implement scalable and distributed systems but developers should always keep in mind why we are doing that — to evaluate faster on business processes, reduce the cost of the experiment.

#### Meaningful health check is important

Self-healing is significant for microservice architecture. And to provide it your service has to report its health state accurate. For example, your service is deployed in **Kubernetes** cluster and exposes **/health** endpoint. Then it will be possible to restart it in case of failure and reroute traffic to a health node instead. Also, it helps you to understand your app better, know all significant dependencies and requirements.

#### Spring Cloud is a good choice for microservices

…if you do not afraid of such vendor-lock. In case if your platform is 100% based on Spring stack it seems pretty logical to try to solve microservices challenges with help of **Spring Cloud**. Bunch of cool project from **Spring Cloud Config** till **Spring Cloud Streams** helps you to build reliable and manageable system. But if you run your services for example on top of **Kubernetes** you will get alternative solutions for those issues for free(like service discovery, load balancing, etc.).

#### Distributed tracing brings transparency into the&nbsp;system

On that field Spring provides us **Spring Cloud Sleuth** solution. It works on top of **Zipkin** , Cloudera or Dapper. As result of integration, you will be able to add to your log messages what’s called **Trace-Id** and Span-Id, so you can track request chain across entire system for example in **Kibana**. Super useful for debugging, dependency analysis, etc.

#### Autoscaling

…isn’t trivial process. Beside of technical support of autoscaling from your platform(for example, Kubernetes has it but limited, but there are some third-party extensions to improve it), you really need to think about scaling policies, pay attention what limits your app performance.

Of course, there are much more useful tips in this book. Here is only some point I focus my attention on. In total — it worth to spend some time and&nbsp;read.
Age of artificial intelligence
Tags: ai, machinelearning, discuss
Published: 2017-09-30 11:46:59

---
title: Age of artificial intelligence
published: true
description: how will an AI driven vehicle react if a little child accidentally comes in front of it while the vehicle is running to reach its destination.
tags: AI,Machine learning, discuss
cover_image: https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSz0WmqLDU8K3o6ojKzi8jRg5LJQZ-Lzk8x4Lb8sOcCrXDXLb7doeWH-2mn
---

how will an AI driven vehicle react if a little child accidentally comes in front of it while the vehicle is running to reach its destination?
Perform small coding tasks for a reliable source of income?
Tags: discuss, question, request
Published: 2017-09-30 11:38:31

---
title: Perform small coding tasks for a reliable source of income?
published: true
tags: discuss, question, request
---

I want to perform small/medium programming tasks for people/businesses online. This could include writing a Wordpress plugin, a jQuery extension, a Node module, Chrome app or adding a feature to some custom CMS or .NET application. I am hoping for short/small projects, quick cash when delivered. On request, not having to come up with some script idea to sell on CodeCanyon. Is this possible in any meaningful way? Are there any (alive) websites for this? Maybe a webmaster forum. Can you name a few to point me in the right direction or perhaps are you looking for someone yourself?
How do you handle updating project dependencies?
Tags: discuss
Published: 2017-09-30 06:29:22

---
title: How do you handle updating project dependencies?
published: true
tags: discuss
---

Most projects use third-party packages as dependency, no matter what languages you use.

How often do you update your dependencies? Do you automate it, and if yes what tool do you use? Do you use single commit for updating each dep or use one commit for all the deps? Some libs don't provide changelogs that makes it hard to know the changes between versions, what are your thoughts on them (are you using them anyway)? Any other thing that you consider when updating deps?

Suggestions, anecdotes, any kind of experiences welcome!
Simple note taking from the command line
Tags: linux
Published: 2017-09-30 06:27:25

---
title: Simple note taking from the command line
published: true
description: 
tags: linux
---

This is a simple function that can be called from the command line, just like if it was a regular command. It is a quick way of taking notes and storing them in a text file.

Just add the following lines to your `~/.bashrc`:
```
# My function to take quick notes on useful commands
notes() {
    echo $1 >> $HOME/notes.md
}
```
It can be used like this:
```
$ notes "my_command -which -I -want -to remember"
```

You can read your notes like this:
```
$ more ~/notes.md
```
You should go to the Global Day of Coderetreat 
Tags: coderetreat
Published: 2017-09-29 23:34:06

---
title: You should go to the Global Day of Coderetreat 
published: true
description: Reasons why GDCR is awesome
cover_image: https://thepracticaldev.s3.amazonaws.com/i/00ok445lgdp2v3y7nqvx.png 
tags: coderetreat
---

First of all, if you have attended a [Global Day of Coderetreat](http://coderetreat.org/) before, you can make a better use of your time, so please **stop reading here**.

Every year, a global event takes place on a Saturday in [dozens of locations](http://coderetreat.org/events/) around the world. During this day, lots of enthusiastic developers gather together to improve their craft and learn tons of things.

The format is actually quite simple: [a challenge](https://bitstorm.org/gameoflife/) is proposed to the attendees at the beginning of the day, and they have to start implementing a solution. There are only three constraints: you must work in pairs, you have to use [TDD](https://en.wikipedia.org/wiki/Test-driven_development), and you don't have much time to finish your implementation. 

Maybe you're thinking how this can be possible...we have a whole day, haven't we? Well, that's true, but the day is organised in short sessions (45 minutes each). In each session, pairs rotate and they start implementing the solution again...from scratch. Also, you have to throw away all the code you just wrote in the previous session, yikes!

You can try different approaches every time you start over, and of course you can change languages, IDEs, etc. In fact you **should** try to use languages you don't know, specifically you should find people who know that language and pair with them. [Pair Programming](https://dev.to/raulavila/my-experience-with-pair-programming) is one of the best ways to absorb knowledge very quickly, and you'll hardly find a place having such a diverse mix of skills and the will to share them. 

I lied a bit before when I said there were only three constraints. The facilitators usually add different additional constraints in every session, because...well, because this way it's more fun :).

You may find that in some sessions you don't learn much but you teach new things to your pair. That will give you an amazing feeling too, and hey, sometimes teaching things is the best way to refresh what you know, challenge your assumptions...it's clearly a win-win.

If I haven't convinced you of attending yet, I'll give you one final reason: the atmosphere is fantastic, and I'll tell you why. The event happens on a Saturday, and it starts very early. Everybody in the room has woken up very early to be there on time, and rest assured that their intention will be getting the best experience and enjoy the day as much as possible.

I'm writing this post in 2017, and this year the event will be on November 18. So you have plenty of time to find the one closest to you. Of course I would be happy to read your thoughts in the comments section after your experience!
Git: rebasing
Tags: git
Published: 2017-09-29 17:55:42

---
title: "Git: rebasing"
published: true
description: 
tags: git
---

Source: https://dev.to/maxwell_dev/the-git-rebase-introduction-i-wish-id-had

>Let’s say when you created your branch off of the master branch, the master branch was on commit #1. Every commit in your branch was layered on top of commit #1. When you’re ready to merge your branch, you discover other developers made changes and the most recent commit is commit #5.

>Rebasing is taking all your branch’s commits and adding them on top of commit #5 instead of commit #1. If you consider commit #1 as the “base” of your branch, you’re changing that base to the most recent one, commit #5. Hence why it’s called rebasing!
 
<!-- -->
>A straightforward rebase has a pretty simple command structure: `git rebase <branch>`. branch is the one you’re rebasing off of. So here you’d run git rebase master. Assuming there’s no conflicts, that’s all the rebase needs!

>The rebase itself technically removes your old commits and makes new commits identical to them, rewriting the repo’s commit history. That means pushing the rebase to the remote repo will need some extra juice. Using git push --forcewill do the trick fine, but a safer option is git push --force-with-lease. The latter will alert you of any upstream changes you hadn’t noticed and prevent the push. This way you avoid overwriting anyone else’s work, so it’s the safer option.

<!-- -->
>If you’ve dealt with merge conflicts before, rebase conflicts are handled essentially the same way. Running git status will tell you where the conflicts are, and the two conflicting sections of code will be next to each other so you can decide how to fix them.

>Once everything is fixed, add and commit the changes like you would a normal merge conflict. Then run git rebase --continue so git can rebase the rest of your commits. It’ll pause for any more conflicts, and once they’re set you just need to push --force-with-lease.

>There’s two lesser-used options you could also use. One is git rebase --abort, which would bring you back to before you started the rebase. It’s useful for unexpected conflicts that you can’t rush a decision for. Another is git rebase --skip, which skips over the commit causing the conflict altogether. Unless it’s an unneeded commit and you’re feeling lazy, you likely won’t use it much.
Explain git pull --rebase to me like Im five
Tags: discuss, git, explainlikeimfive
Published: 2017-09-29 14:49:57

---
title: Explain git pull --rebase to me like Im five
published: true
tags: discuss, git, explainlikeimfive
---

I have been using git for years now and honestly, I really don't quite understand how certain codes work like for in this case `git pull --rebase`. Can someone explain to me how rebase works like I'm five?

Thanks and you're awesome!
Creating Single Page Applications in Gruu
Tags: showdev, javascript, npm, ui
Published: 2017-09-29 14:30:09

---
title: Creating Single Page Applications in Gruu
published: true
description: 
tags: showdev, javascript, npm, ui
---
Hello! I have recently created a UI JavaScript library, because I wanted to use it in my personal project. However, it turned out to be something bigger, so I wanted to share it with you and hear your thoughts on Gruu :)

Gruu in a nutshell:

* write UI fully in JavaScript
* virtual DOM
* efficient view updates
* built-in state management
* available extensions: gruu-router (SPA routing management) and JSX support
* small file size ;)


Here is GitHub repository: [https://github.com/MarekLabuz/gruu](https://github.com/MarekLabuz/gruu)


This is my first such a project so please be understanding.


I also invite you to Gruu website: [https://gruujs.com](https://gruujs.com/) if you feel interested :)
Integrating library via custom podspec
Tags: swift, podspec, cocoapods
Published: 2017-09-29 09:26:12

---
title: Integrating library via custom podspec
published: true
description: 
tags: swift, podspec, cocoapods
---

Original post https://github.com/onmyway133/blog/issues/81


Today I am about to integrate a library that does not support Cocoapods yet. It would be cumbersome to do it manually, because you have to configure `xcconfig`, `framework search path`, `assets`, and these steps are not well documented.

You can do this with custom podspec. In my case, I need to install [PinchSDK](https://bitbucket.org/fluxloop/pinch.installpackage/wiki/Home). First, declare a `PinchSDK.podspec` in your project folder.

```ruby
Pod::Spec.new do |s|
  s.name             = "PinchSDK"
  s.version          = "1.9.14"
  s.summary          = "Pinch samler dessuten inn data hver gang en mobilapplikasjon oppdager en Pinch-beacon."
  s.homepage         = "https://bitbucket.org/fluxloop/pinch.installpackage"
  s.source           = { :http => "https://bitbucket.org/fluxloop/pinch.installpackage/raw/master/iOS/PinchSDK.zip" }
  s.authors = 'Fluxloop'
  s.license = { type: 'MIT' }
  s.platform     = :ios, '8.0'
  s.requires_arc = true
  s.resource = 'PinchSDK/Pinch.bundle'
  s.vendored_frameworks = 'PinchSDK/PinchLibrary.framework'
  s.xcconfig = { 'OTHER_LDFLAGS': '-ObjC' }
  s.public_header_files = 'PinchSDK/PinchLibrary.framework/Headers/PinchLibrary.h'
  s.source_files = 'PinchSDK/PinchLibrary.framework/Headers/PinchLibrary.h'
end
```

Then, in your `Podfile`, you can point to this `podspec`

```ruby
pod 'PinchSDK', podspec: 'PinchSDK.podspec'
```

Finally, since this PinchSDK uses `objc`, you need to declare it in your `bridging header`

```c
#import <PinchLibrary/PinchLibrary.h>
```

Now, just `pod install` and you're done ðŸŽ‰
TypeError: 'list' object is not callable
Tags: mongodb, flask, mongoengine
Published: 2017-09-29 06:44:27

---
title: "TypeError: 'list' object is not callable"
published: True
description: TypeError in API response
tags: mongodb, flask, mongoengine
---

I am writing an API in Flask with mongoengine. In my 'search' endpoint, the API receives an 'id' and retrieves all the objects from database against that id. But when I try to return those objects in json form like this:

        return [redemp.to_json for redemp in redemps]

I get the error saying "TypeError: 'list' object is not callable"
What's wrong here?
Groovier Groovy with Java 8 Streams
Tags: programming, groovy, java, coding
Published: 2017-09-29 01:51:14

---
title: Groovier Groovy with Java 8 Streams
published: true
description: My experience using Java 8 Streams in Groovy 
tags: Programming, Groovy, Java, Coding
---
Consider writing [Groovy](http://www.groovy-lang.org/) code to retrieve the transformed version of an element from a given collection such that transformed version of the element satisfies a given predicate.

Here’s a Groovy-only code snippet that uses only the features of Groovy.

```groovy
(0..N).collect { e -> transform(e) }
      .findResult([]) { e -> predicate(e) ? e : null }
```

Here’s a Groovy+Java code snippet that uses Java 8 streams.

```groovy
IntStream.range(0, N)
         .mapToObj { e -> transform(e) }
         .filter { e -> predicate(e) }
         .findAny()
         .orElse([])
```

While the first snippet transforms (_collect_) every element in the source collection before executing _findResult_ (staged execution), the second snippet executes the entire pipeline of functions for every element in the source collection. Consequently, the Groovy+Java snippet is more efficient as it stops transforming the elements as soon as the transformed version of an element is found.

In terms of parallelism, here’s the Groovy-only snippet parallelized using [GPars](http://gpars.org/).

```groovy
GParsPool.withPool {
    (0..N).collectParallel { e -> transform(e) }
          .findResult([]) { e -> predicate(e) ? e : null }
}
```

While _collect_ is parallelized (as _collectParallel_), findResult isn’t parallelized as it isn’t supported by GPars. Further, even if _findResult_ was parallelized, it will only execute after _collectParallel_ completes and, hence, the above observed inefficiency due to the staged execution will still persist.

In comparison, here’s the parallelized version of the Groovy+Java snippet.

```groovy
IntStream.range(0, N)
         .parallel().
         .mapToObj { e -> transform(e) }
         .filter { e -> predicate(e) }
         .findAny()
         .orElse([])
```

Unlike the parallelized Groovy-only snippet, each function in the pipeline is executed in parallel as its input becomes available. Hence, this will be more efficient than the parallelized Groovy-only snippet.

Few years ago, Groovy made Java groovier. With Java 8 streams, I think Java can make Groovy groovier.

That said, I am eager to see how will Groovy evolve to make Java groovier.