teleren/devto huggingface dataset:
Always post your solutions
Tags: softwaredevelopment, community, wordpress
Published: 2018-10-04 02:43:32

---
title: Always post your solutions
published: true
tags: Software Development,Community,wordpress
canonical_url: https://gilcreque.blog/2018/09/06/always-post-your-solutions/
---

I had a problem with a WordPress plugin recently and figured out the problem on my own. I made sure to go back and give the solution in case someone else runs into the same issue. One week later it already paid off. Always post your solutions.

![Screenshot 2018-09-06 09.16.46](https://gilcreque.files.wordpress.com/2018/09/screenshot-2018-09-06-09-16-46.png?w=1140)
How To Estimate Projects Accurately   
Tags: projects, estimation
Published: 2018-09-06 13:10:31

---
title: How To Estimate Projects Accurately   
published: true
description: 
tags: #Projects #Estimation
---

Most teams don't get their estimates right. And that included us too! 🙈

So, we set out to solve this issue by reading, talking to other people, and trying out different solutions ourselves.

Today, I can say our method works well for our team and we're able to get our estimates more accurately, which has has helped our team a lot. 🎉

Here's what we do and these are our key takeaways👇🏼

https://blog.zepel.io/project-estimation/
git-askpass.exe: No such file or directory. Visual Studio
Tags: misc, visualstudio, git, bitbucket
Published: 2018-09-07 10:49:33

---
title: git-askpass.exe: No such file or directory. Visual Studio
published: true
tags: Misc,visual studio,Git,BitBucket
canonical_url: https://blogit.create.pt/ricardocosta/2018/09/06/git-askpass-no-such-file-visual-studio/
cover_image: https://i2.wp.com/blogit.create.pt/wp-content/uploads/2018/09/git.png?resize=1000,420
---

I was getting an error when I tried to sync to my Git BitBucket repository with Visual Studio 2017:

_git-askpass.exe: No such file or directory._

To resolve this I had to:

1. Remove Git from Control Panel -\> Uninstall
2. Remove Git Windows Credential Manager from Control Panel -\> Uninstall
3. With Visual Studio 2017 Installer, remove Git for Windows
4. Install Git
5. Install Git Windows Credential Manager
6. With Visual Studio 2017 Installer, install Git for Windows

The post [git-askpass.exe: No such file or directory. Visual Studio](https://blogit.create.pt/ricardocosta/2018/09/06/git-askpass-no-such-file-visual-studio/) appeared first on [Blog IT](https://blogit.create.pt).
C++ For Go Programmers: Part 3 - Maps
Tags: cpp, go, goodideas
Published: 2018-09-06 09:22:55

---
title: C++ For Go Programmers: Part 3 - Maps
published: true
description: Maps
tags: cpp,go,goodideas
---

>**DISCLAIMER**: *This series title is inspired by [a terrific article on the Go Wiki](https://github.com/golang/go/wiki/GoForCPPProgrammers)* **but, unlike that article***, none of the information presented in this series should in any way be taken as sound advice. The author presumes on the part of the reader a competency in both modern C++ and Go which far exceeds the author's own. This is actually a thinly-veiled game devlog*

`map` is *easily* the **worst** built-in datatype in Go. I have an outline of the reasons why but we're not about negativity here. Besides, I'm pretty sure someone else has already written that article. 

Nope, we're not about that life. We're about exploring wonderful and exciting new possibilities in C++!!! ...by a combination of reinventing the wheel, baby duck syndrome, and eschewing well-defined best practices.

## if ok {

In Go, you can access a map value and check if it exists in one step:

```
m := map[string]int{
    "one": 1,
    "two": 2,
}

one, ok := m["one"]     // 1, true
two, ok := m["two"]     // 2, true
three, ok := m["three"] // 0, false
```

`std::map` in C++ does have `operator[]` but its behavior is different:

>Returns a reference to the value that is mapped to a key equivalent to key, **performing an insertion if such key does not already exist.**

That's not what we want.

`std::map::find` however, will allow us to determine if a value exists first.

We don't have multiple return values in C++ so we'll have to pass a variable by reference to get the value.

Here goes nothing:

```
#include <map>

template<typename K, typename V>
bool mapValue(std::map<K,V> m, K key, V& value) {
    auto it = m.find(key);
    if(it != m.end()) {
        value = it->second;
        return true;
    }
    return false;
}
```

Adapting the Go example above somewhat, use it like this:

```
std::map<std::string,int> m;
m["one"] = 1;
m["two"] = 2;
    
int one;
bool success = mapValue(m, std::string("one"), one);
if(success) {
    // ...
}
```

w00t

---

This is actually the first time I've made a templated function and it was actually kinda fun even though I know I'm going down the path to ruin here (first you start sprinkling your code with some nice little generics every so often then you start doing metaprogramming next thing you know you're writing compile-time tetris and contributing to Boost)

It should be noted that the implementation here won't work with *all* types, notably C-style `char*` strings (hence why I used `std::string` in the example usage). 

And also I probably shouldn't be using `std::map` at all for storing information for special tiles in my tilemaps but I'm not worried about it it's fine don't worry about it shhhhh
Help! Looking for the best online program to continue learning Android development
Tags: help, android, beginners, learning
Published: 2018-09-06 06:06:35

---
title: Help! Looking for the best online program to continue learning Android development
published: true
description: 
tags: #help #android #beginners #learning
---

Hello, I'm currently learning Android development and plan om eventually taking the Google's Associate Android Developer certification. I have already gone through the courses in the Android basics series from Udacity and found the teaching style really good for me. I also like that you have projects to work on. I never enrolled in the Nanodegree itself, but I followed along and did all projects. I was thinking about going through the courses in the Android Developer Nanodegree and working on all projects, but I'm not sure about it anymore. (I have to clarify that I would never enroll in the Nanodegree itself since it become way too expensive, and the quality of their mentors is not very good, from what I experienced in a free trial). I've read that the quality of these courses is not on par with the one in the beginner courses, and that lots of concepts are rushed and not well explained. This worries me and I've started researching other options in order to see what's the best one for me. I've come to learn of the following resources:
- Treehouse: has Android tracks for beginners, intermediate and advanced levels. I don't understand if you get some sort of support with questions.
- Pluralsight: has a specific path for the Google certification, and the courses inside seem reasonably up to date (by looking at their dates at least). They offer mentors.
- Udemy courses

I am looking for something with:
- a great and logical structure of topics
- concepts that are thoroughly explained
- Mix of theory and practice by following along with the instructor's project
- step by step or at least final working code version I can compare my work with
- I'd love the possibility to have support with questions or coding task/project reviews (and that it's actually good support)
- Up to date content

I am willing to pay for something if it's really good and proves to be worthy. I hope people who've had experience with these platforms can chime in and comment on their experiences and give some advice! Thanks!
Pains of Java generics solved in Kotlin
Tags: java, kotlin, generics, covariance
Published: 2018-09-06 05:54:41

---
title: Pains of Java generics solved in Kotlin
published: true
description: How Java and Kotlin solve casting of generic classes with covariant types
tags: java, kotlin, generics, covariance
---

## The problem

> Why does this not compile in Java?

```java
Optional<Integer> optionalInteger = Optional.of(1);
Optional<Number> optionalNumber = optionalInteger;

int i = optionalNumber.get().intValue();
```

I am usually very conservative when using generics in Java. When I try to "be smart" I usually over-complicate things and end up with `@Suppress("Unchecked")` annotations all over the code. Programming language should always be both easy to write and read. So why is it not possible to do the cast in the example above?

I would expect the above to work because:

- `Number` is parent to `Integer` class in Java
- `optionalNumber` is a producing `Number`

## The Java "solution"

It can be solved by using the `extends`/`super` keywords to specify the upper bound.

```java
Optional<? super Integer> optionalInteger = Optional.of(1);
Optional<Number> optionalNumber = (Optional<Number>) optionalInteger;

int i = optionalNumber.get().intValue();
```

This will work, but we will get `Unchecked cast` warning on the second line, which _does_ make sense in the world of Java generics, but it's still ugly. Also, what does it say to reader when `<? super Integer>` is used?

## The Kotlin solution

Kotlin has solved this with [**declaration-site variance**](https://kotlinlang.org/docs/reference/generics.html#declaration-site-variance) using keywords `in`/`out`. We will simulate the `Optional` class (since there isn't one in Kotlin) with `get()` function for this example:

```kotlin
class Optional<out T>(val t: T) {
    fun get(): T = t
}

val optionalInteger = Optional(1)
val optionalNumber: Optional<Number> = optionalInteger

val i = optionalNumber.get().toInt()
```

By annotating the `T` parameter with `out` keyword we will specify that `T` will always be used as output value (e.g. produced), thus it is safe to perform above cast (since the produced value is safe to cast). Also, if you try adding member function `fun set(t: T)` you will get a compiler warning, that `T` is `out` parameter but occurs in `in` position. It is easy to write, read and understand.

As I mentioned, Kotlin does not have separate `Optional` class. Instead it has some [cool language features](https://kotlinlang.org/docs/reference/null-safety.html) for null checking that you can find in any other modern language:

```kotlin
haveReadArticle?.giveItA❤️()
```

😎
All-new VSCode Settings Editor UI
Tags: vscode, vscodepro
Published: 2018-09-06 04:22:41

---
title: All-new VSCode Settings Editor UI    
published: true
description: All-new VSCode v1.27 brings a new UI Settings Editor. I just released a new ver of 🦄 Shades of Purple VSCode theme to improve its styling.
tags: vscode, vscodepro
---

Howdy-do, folks! 🙌

Over the past few months, VSCode team has been developing a GUI for editing settings. In the `v1.27`, the new UI settings editor has become the default editor. 

[![new VSCode Editor UI](https://on.ahmda.ws/c8ef21e13058/c)](https://marketplace.visualstudio.com/items?itemName=ahmadawais.shades-of-purple) 


### Settings Modification/Validation 

Settings that have been modified are now indicated with a colored line, like modified lines in the editor. The gear icon opens a context menu with an option to reset the setting to its default value. Setting values are now validated, and any validation errors are displayed.

[![new VSCode Editor UI](https://on.ahmda.ws/dc5b7adc6325/c)](https://marketplace.visualstudio.com/items?itemName=ahmadawais.shades-of-purple) 

### Shows Matching Extensions

When you search in settings, our Bing-powered search service is still providing results that it thinks are relevant. Now, that service will also show you extensions from the Marketplace that have relevant settings. You will see a button at the bottom of the settings search results, Show matching extensions. When clicked, the Extensions view will open with the matching extensions.

[![new VSCode Editor UI](https://on.ahmda.ws/a4402ed79a2f/c)](https://marketplace.visualstudio.com/items?itemName=ahmadawais.shades-of-purple) 


> You can still access the JSON settings editor, either by using the command `Open Settings (JSON)` or by changing your default settings editor with the `"workbench.settings.editor"` setting. But I suggest you create a keyboard shortcut by pressing ` COMMAND (⌘) + k then COMMAND (⌘) + S` and search for `Settings JSON` and then set ` COMMAND (⌘) + PERIOD (.)` as the shortcut for the old JSON editor.

![settings.json](https://on.ahmda.ws/0efb14123feb/c)


🔥 [Checkout the TIP →](https://vscode.pro/tip/18)

## [🦄 Shades of Purple VSCode theme](https://marketplace.visualstudio.com/items?itemName=ahmadawais.shades-of-purple) 

I just released a new version of [🦄 Shades of Purple VSCode theme](https://marketplace.visualstudio.com/items?itemName=ahmadawais.shades-of-purple) to improve upon the styling for this new editor with:

📯 Theme Matching back/foreground colors 
⚠️ Change Indicator —  also decided to move from green to yellow color.



{%tweet 1037554799418519552 %}

> P.S. I am making every effort to launch my [VSCode.pro](https://VSCode.pro/) this month. Bear with me and maybe signup for the update. Peace! ✌️
Create Clickable Comment Link In PHP
Tags: php, javascript, webdev, progrmming
Published: 2018-09-06 04:04:41

---
title: Create Clickable Comment Link In PHP
published: true
description: Create Clickable Comment Link In PHP
tags: #php #javascript #webdev #progrmming
---

Post Link : <a href="https://www.skptricks.com/2018/01/create-clickable-comment-link-in-php.html" > Create Clickable Comment Link In PHP </a>

This tutorial explain how to create clickable link using HTML Comment Box. You May have been observed different links, while posting comments in various blogs and via. these links (Clickable links) you can easily redirect to another page. If the links displayed as a text, then no one will observe you comments and will not get attention from different blogger.

So, Here we are going to provide you a example how to display clickable hyperlink using HTML comment Box.


<img src="https://2.bp.blogspot.com/-1-lM5R79ORQ/WmQ5yl_G92I/AAAAAAAABM8/_btIGvtXdZcbCFdqeh4zTMJKLBxeoZytwCLcBGAs/s640/clickable%2Blink.PNG" />

<a href="https://www.skptricks.com/2018/01/create-clickable-comment-link-in-php.html" > View Source Code </a>
Coding Right Before Bed -- I Can't Do It
Tags: sleeping, coding, windingdown, wellness
Published: 2018-09-06 00:39:44

---
title: Coding Right Before Bed -- I Can't Do It
published: true
description: Coding Before Bed -- I Can't Do It
tags: sleeping,coding,winding down,wellness
---

I was in junior high school and obsessed with Dance Dance revolution. If I went to bed directly after playing DDR, I'd shut my eyes and see arrows scrolling across the back of my eyelids. It was kinda cool, but annoying at the same time since I was trying to sleep.

![alt text](https://vignette.wikia.nocookie.net/dancedancerevolutionddr/images/3/34/DDR2009Logo.png/revision/latest/scale-to-width-down/1000?cb=20130508042349 "DDR Logo")

Fast forward to college and I find myself in my dorm at 2:00 AM working on a take-home final.

**The final's objective:**
*Take a buggy implementation of a [Red Black Tree](https://youtu.be/qvZGUFHWChY) given by the professor and fix it.*

![alt text]
(https://www.cs.auckland.ac.nz/software/AlgAnim/fig/rb_tree1a.gif "Red Black Tree")

It was late so I figured I'd call it a day and resume my work in the morning.

Didn't happen.

I could NOT fall asleep. I'd close my eyes but my brain wouldn't shut up. My mind kept going back to my code, recalling rules associated with Red Black Trees, mindlessly making up scenarios that had no solutions.

I ended up getting out of bed and working on it further. I even took Benadryl in hopes to get drowsy enough to sleep. I didn't make any progress despite spending a lot more time on it that evening.

So what was I suppose to do? After a few years of experience, I've noticed myself occasionally reliving this episode. I've discovered high correlation with not being able to sleep and coding into the late hours of the night. Solution: no coding within a few hours of going to bed.

I've become a true believer of winding down before bed. No coding. I try to avoid looking at screens in general and utilize blue light filters if possible. If I do end up playing my Nintendo Switch I'll play the zenful Stardew Valley instead of Splatoon 2 which tends to get me all riled up.

![alt text]
(http://pm1.narvii.com/6806/04b7ee09dda85a0f0a46d83dd9e1aa3351652be1v2_128.jpg "stardew valley")

I still have restless nights occasionally, and a hard-to-find bug is quite capable of absorbing my mind's thoughts when I'm going to bed, but the more I try to unwind before going to sleep the better I'm able to.

This is my first post :)
[Challenge] Can you play with your language's syntax without breaking it?
Tags: php, programming, fun, challenge
Published: 2018-09-06 02:49:57

---
title: [Challenge] Can you play with your language's syntax without breaking it?
published: true
description: Playing with PHP's syntax
tags: php, programming, fun, challenge
---


Four years ago I was so bored I made this:

```php
<?php
$lol = "lol";
define("HAHA", $lol, 1);
class ha
{
    public function result()
    {
        return 'This will be the result!';
    }
}
class idk
{
    public function lol()
    {
        return array(0, new ha() );
    }
}
function lol()
{
    return array( new idk() );
}
echo ${HaHa}()[0]->{${$lol}}()[1]->result();

```

This still works on PHP 7.1! Can you do it with your favorite language?

**NOTE**: This is just for fun. Don't do this while actually coding!
Developer Diary #1 - An Introduction
Tags: devdiary
Published: 2018-09-06 02:22:43

---
title: Developer Diary #1 - An Introduction
published: true
description: An introduction of the purpose of this developer diary
tags: devdiary
---

Hello and welcome!

This is my developer diary, a section of my life (and the purpose of this account) to share what I did this week in code.

My intention with this is to share all my creative process and decisions on a personal project(s) hoping that someone finds it useful and to boost my motivation for continuous development.

I'm gonna try to share any kind of photos or planning phases and fully explain them in case someone finds them interesting, worst case scenario gonna remade them in Photoshop or any other type of software. But _why so eager to share that?_ I believe that the first phase, the planning phase, is the most important in any type of job, not only in design and development and also, I find it easier to _see_ what I'm coding.

Other thing, one very important, that I'm going to share is code segments that I find too complex or interesting or weird or... well you name it, you never know if that is going to be the answer in a future interview question of a show aired on TV that you are going to participate.

My vision or objective with these posts is to find balance between my studies and my projects, also, this is not only me sharing knowledge, I want to find feedback between you and me and between you and the comments.I believe that it is impossible to develop something without a second opinion, in other words, it is (for me) impossible develop alone, that's why we have pages like [stackoverflow](https://stackoverflow.com/). And (more as a secondary objective) is to perfect my English skills and writing skills in general.

Hope you find these useful!
Erase Distinctions Between Desktop and Mobile, Web and Native
Tags: philosophy, dreams, responsive
Published: 2018-09-05 23:56:18

---
title: Erase Distinctions Between Desktop and Mobile, Web and Native
published: true
description: For the user-- even for the developer-- there should be no distinction between platforms.
tags: philosophy, dreams, responsive
cover_image: https://thepracticaldev.s3.amazonaws.com/i/2v13pdj8udvvo5pvxbzr.png
---

I'll try here to articulate something I feel about how software should be.  This includes both software for end users, and software for developing software (such as programming languages).  This is something that, whenever I run up against something in today's software that runs counter to this principle, I sigh and shake my head.  Here it is:

#For the user, there should be no distinction between platforms.

An application should give the same capabilities, the same information (modulated by platform-specific idioms and resources) regardless of whether the user is using the Web or a mobile app.  The distinction between the two is artificial.  The fact that developers currently have to use different languages and tools to develop for the different platforms is either an oversight or an intentional barrier.

I should be able to save a website as an icon to my phone's home screen, and use it as an actual mobile app, not just a convenient bookmark to a tab in Safari.  Conversely, I should be able to use something that's ordinarily a mobile app, within a browser as if it were a web application (perhaps with URLs to various screens or objects within it).

I consider [responsive design](https://en.wikipedia.org/wiki/Responsive_web_design), wherein a web page changes its layout to fit the screen real estate available, to be a step in the right direction.  Ideally, it's just as easy to reach all the relevant links and areas whether the user is using a desktop or mobile web browser.

Some software is written for developers, and so...

#For the DEVELOPER, there should be no distinction between platforms

If I want to develop native apps in Python, I should be able to do that.  If I want to write front-end code in Python, I should be able to do that (which is why I got excited about [Transcrypt](https://dev.to/cathodion/trying-out-transcrypt-3edn) for a bit).  I want the same for you and your favorite language (if that is, for some reason, not Python 😬).

Carrying this even further, I feel like I should be able to use a language with a framework written for another language.  Python on Rails, for example.  

#"A world without borders or boundaries..."

I'm sure there are lots of reasons why this is all a bad idea, or not feasible.  Or maybe you know of good ways of crossing these artificial boundaries, or have an idea of how to erase them forever.  Let me know what you think in the comments.

{% youtube aTL4qIIxg8A %}

*Cover image: Milliau Viaduct, France.  Source: [Digital Trends](https://www.digitaltrends.com/cool-tech/biggest-bridges-in-the-world/), or at least a [Google Image Search page](https://goo.gl/images/MGwJEo) that links there.*