teleren/devto huggingface dataset:
Stop saying you dont have time!
Tags: productivity, beginners, career, discuss
Published: 2018-05-25 18:42:49

---
title: Stop saying you dont have time!
published: true
description: This week I want to talk about something that I have used for a excuse quite a few times. Before I finally started getting a schedule going. And that is saying the excuse I don’t have time to learn blank. 
tags: #productivity #beginners #career #discuss
---
This week I want to talk about something that I have used for a excuse quite a few times. Before I finally started getting a schedule going. And that is saying the excuse I don’t have time to learn blank. Now between school and work. I don’t have all the time in the world to schedule out and get stuff done. So how do I make time to write this post. Do homework program and work on math ect. It’s not that hard. The first thing you need to do is get on a schedule. The reason for this is because it’s going to allow you to asses just how much time you have for specific activities. It’s also going to give you focus and motivation to continue to work on specific projects. 

For me, that was getting up around 10 am before going to work and blocking out specific amounts of time to work on what is more important that day. Then head to work and then if needed work on things after work. Now here is the next part where you will begin finding the time. So, let’s say you have a family or work going to class whatever the case is. Now during all this, there is always going to be some sort of time. Even if its small as 10 minutes. Use it you will be surprised just how much you can get done in about 10 to 15 minutes. For me as if I have 10 to or 15 minutes of time at work in between downtime or breaks and even lunch. I take it and either program work on a chapter of learning math or whatever else needs to get finished. And while this short amount of time may seem like you did not get a whole lot done as the day comes to an end and a day turns into a week ect. You will be able to see just how much you accomplished. 
Now there are also a few videos that if you're Interested I suggest you watch. While one of them Too busy to learn blender. Is not exactly on topic Andrew price’s advice is something that I personally use every day. In his video, he talks about exactly what I am discussing here. And gives some really good advice.  
{% youtube 39AV16MshrE %}


Secondly, I suggest checking out this other video. It’s a speech from Admiral William McRaven. This one is a bit hard to put into words. I just suggest you watch it and see for yourself. As it will tie into the part of taking and setting your goals for the day. The video is called change the world by making your bed.  
{% youtube U6OoCaGsz94 %}

Lastly, as I mentioned in my last post I wanted to begin sharing what I worked on this week. This week I worked on a short program.  Called triple triangles it’s a simple calculator that will tell if a set of numbers is apart of the Pythagorean triple. https://github.com/gwartney21/TripleTriangles-. And as always thanks for reading the post. And I will talk to you all next week.
You Only Get One Chance (most of the time)
Tags: career
Published: 2018-05-25 18:42:34

---
title: You Only Get One Chance (most of the time)
published: true
description: Don't interview until you're ready
tags: career
---

![Dog Struggling on Leash](https://thepracticaldev.s3.amazonaws.com/i/zug8rsuxos3h5exo3h81.png)

You're dying to get out there to interview for that new job. You stumble upon that dream position for that start up with the type of team you've always wanted to work for. Except, one of the requirements is experience with a framework you might only have passing knowledge of and they want someone who is confident.

You might be able to BS your way through. You might be able to cram enough knowledge about that framework to get your face to face interview. 

STOP! Turn around. Get back here.

I know how hard it is to want that dream opportunity so bad that the fear of losing it can drive you to make you take an interview you aren't ready for. 

Even though you might miss that awesome position you've always wanted, you don't want that employer to know who you are until you are absolutely ready to take that interview. You never know when another position at that company might open up, and you do not want them to remember you as that person who tried to fake your way through the interview.  

I bring this up because I recently had to let the unicorn go. It was a company in Distributed Cloud Storage, which is something I'm extremely interested in. They wanted someone who knew VueJS so well that I could architect a solution using it. I've only used it professionally as a UI plug-in. I'm still taking courses and building out practice projects. I'm still filling out my Github with examples. I'm still a little green. So I passed on it and turned off my Linked In ready light. Maybe in a couple of months I'll have something I'm proud to show a future employer. I'll have fun learning in the mean time. I also know that I haven't blown it with a company that I might get a second chance at some day.
Securing API key in Android without pushing to remote repository (GIT)
Tags: androidgradle, git, androidappdevelopmen, android
Published: 2023-01-06 17:41:53

---
title: Securing API key in Android without pushing to remote repository (GIT)
published: true
date: 2018-05-25 18:23:07 UTC
tags: androidgradle,git,androidappdevelopmen,android
canonical_url: 
---

API keys exists everywhere! It’s common in all the modern apps!. Isn’t it? So, ever thought of securing it? Nope I’d never done that, before this post. I had done the same, tons of time committing to the repository and here are the hurdles that I had overcome.

**We’re not a Time Machine :-)**

Absolutely not and there comes the life saver, **git.** Though it helped a lot to delete API Key from the previous commits in **strings.xml** using **_git-filter-branch,_** but what if the project has bunch of branches and commits?, and it is not a better idea to play with the code base.

> Your code can be open sourced, not your API key

**Prevention is better than cure**

Let’s cultivate the seeds at early stage and secure our data using custom properties.

**STEP 1:** Create a file named **secrets.properties** in the main folder (i.e below local.properties, app, build, gradle, README.md,etc.

![](https://cdn-images-1.medium.com/max/249/1*SvmviFvmMppUGW-NMvzbwg.png)

**STEP 2** : Paste your API Key in **secrets.properties** (i.e GOOGLE\_API\_KEY, FACEBOOK\_APP\_ID, etc)

![](https://cdn-images-1.medium.com/max/600/1*4-L7eRmLAY4XZipd4GgS1Q.png)

**STEP 3** : Sync the project or Rebuild.

**STEP 4** : Open **build.gradle (app)** and create a **_def_** function to access the key declared in the **secrets.properties**.

{% gist https://gist.github.com/TakeoffAndroid/cf14ab160901004cdcc0f03bf9bbe35a %}

**STEP 5** : Create a variable for the function **getApiKey()** in **defaultConfig** using **_manifestPlaceholders_** to use it in **_AndroidManifest.xml_**

{% gist https://gist.github.com/TakeoffAndroid/6ddfd4fd1919273c43d9bb26091acf2b %}

Hurray! You’re good to go. Now **GOOGLE\_MAPS\_API\_KEY** variable is public and can be used in **_AndroidManifest.xml_** like below

{% gist https://gist.github.com/TakeoffAndroid/ea6a37292d8c04f8580ad60cd8df8bf1 %}

> **manifestPlaceholders**  — It helps to create a global variable that can be used only in AndroidManifest.xml

If you want to use it dynamically inside a Class, then add **buildConfigField** like

{% gist https://gist.github.com/TakeoffAndroid/52144babe65f6f5d5b23658457cee8e9 %}

And, you can use GOOGLE\_MAPS\_API\_KEY in Java or Kotlin classes like

```
BuildConfig.GOOGLE_MAPS_API_KEY
```

> Finally, don’t forget to add **secrets.properties** to your  **_.gitignore_** file.

Click here to [**download**](https://play.google.com/store/apps/details?id=com.thoughtworks.whatyourward&hl=en_IN) the **what your ward**  — A social concern app built by **ThoughtWorks** to identify corportation wards in chennai.

[**Github link**](https://github.com/chennaitricolor/whatyourward-Android)
What's your favourite CMS?
Tags: discuss, cms
Published: 2018-05-25 15:28:04

---
title: What's your favourite CMS?
published: true
description: 
tags: discuss, cms
cover_image: https://thepracticaldev.s3.amazonaws.com/i/lxmyver245z0x91op5tt.png
---

I have a question!

What's your favourite CMS either from the point of view of a developer, or that of a content editor? How about your least favourite?

Yes I am repeating the word "favourite" quite a lot. Mostly because I know the spelling will make a portion of the people who read this start to twitch.

Personally, I like the content-editing experience of Wordpress > 4.0, but I don't rate it as a good CMS because of its PHP-led design and the fact it's all a bit tacked-on because didn't _start out_ as a CMS.

I'm more of a data person usually and if the world was like me we'd all be using markdown in a long list of fieldsets and an ORM.

So go on, what do you think is particularly good or bad?

Cover image by [Web Hosting](https://unsplash.com/@webhost) on [Unsplash](https://unsplash.com)
ByteArray.js - Working with binary data was never so easy!
Tags: javascript, actionscript
Published: 2018-05-25 17:57:09

---
title: ByteArray.js - Working with binary data was never so easy!
published: true
description: An equivalent to Actionscript 3's ByteArray for Javascript with AMF0 and AMF3 support.
tags: #javascript, #actionscript
---

ByteArray.js is an implementation of Actionscript 3's ByteArray, but then in pure Javascript. This library supports most of it's features from Actionscript 3. A small goal is to make Actionscript 3 developers switch to a newer platform by supporting a key library. The default length of the buffer is 4096 bytes, but if you want to use more, go ahead, you're a rebel.

https://github.com/Zaseth/ByteArray.js/tree/master
Why is everyone upgrading their UA and PP?
Tags: discuss, netneutrality
Published: 2018-05-25 17:49:17

---
title: Why is everyone upgrading their UA and PP?
published: true
description: 
tags: discuss, netneutrality
cover_image: https://www.upcounsel.com/blog/wp-content/uploads/2015/02/Net-Neutrality1.jpg
---

I have seen notifications on Quora and Reddit suggesting me that they are upgrading their *User Agreement* and *Privacy Policy*, why is everyone doing that?

Does it have any bad implications on us users and also what correlation does it have with the development of such site on backend? if someone can explain this, that would help me explain the Net Neutrality thing from a software developer's perspective
I Got By On A Software Project With Help From My Friend
Tags: programming, career, culture, productivity
Published: 2018-05-25 17:36:43

---
title: I Got By On A Software Project With Help From My Friend
published: true
description: There's no shame in getting help from a friend on a software project!
tags: #programming #career #culture #productivity
---

Let me tell you the story of a project I worked on soon after moving to Austin, Texas.

I was new to the consulting side of the software development industry, and didn't know anyone in town.

After being put on a project with a more experienced consultant, I ran into a few challenges.

But after realizing the other consultant wanted to help, I got myself out of a jam that was starting to make me feel pretty stressed out.

I hope this story helps you think about the next time you're struggling to get some work done.

There's no shame in asking for help, or even giving your work over to someone else.

Businesses pay us to get value delivered to customers -

but we don't always have to be the ones to do it!

Visit my site to watch the full video (or listen as a podcast):

# [📺 Watch or 🎧 Listen](https://jaymeedwards.com/2018/05/22/i-got-by-on-a-software-project-with-help-from-my-friend/)

<hr/>
[🔔 Subscribe for over 100 videos on healthy software development](https://YouTube.com/c/JaymeEdwardsmedia?sub_confirmation=1)
[Entry] Mafia: A Game About Deduction
Tags: pushercontest, react, javascript, node
Published: 2018-05-25 15:25:52

---
title: [Entry] Mafia: A Game About Deduction
published: true
description: An app/hack submitted to the first-ever DEV Community contest. 
tags: pushercontest, react, javascript, node
---

# What I built

Mafia is an online version of the popular icebreaker/party game with the same name. It is also known as Werewolf to some. In this game, players are divided into two groups, the Mafia and the Villagers. Within the Villagers, there are two special roles, the Doctor and the Detective. The game is played in two phases: Day and Night.

During the Day phase, the players tries to deduce which players belong to which group and anyone can put a specific player up for public elimination. If a majority vote succeeds, the player is eliminated. During the Night phase, the Mafia can chat to determine which player they want to eliminate while the Doctor can choose one player to save and the Detective can investigate one player to see which group they belong to.

The game ends when either the Mafia eliminate all the Villagers or the Villagers eliminate the Mafia.

## Demo Link

https://app-mafia-game.herokuapp.com

## Link to Code

https://github.com/christianhoward/mafia

# How I built it

**Stack**
React.js
Node.js/Express.js
Pusher

When I originally thought of this idea, I thought Pusher would only be used for the chat portion and everything else would be pretty straight forward. That was not the case what-so-ever. I should have realized that Pusher would be needed for just about every part of the app and not just the chat. Manually testing a project of this size was also tough to handle. Knowing what I know now, I would probably opt for something less complex for my first go-around with a technology that is new to me (Pusher).

# Additional Resources/Info 

Unfortunately, I encountered a road block in the form of a last minute coding challenge that needed to take priority, so this is no where near being as polished as I would like.

This game is hard coded for 7 players, so if you are interested in trying it out, I would recommend having 7 total players (including yourself). I also had to hard code the roles for the game, so the role distribution is never randomized. If I had more time, I would have figured out a way to properly randomize the roles. It can be a little finicky at times, but I'm not sure if this is because of my testing locally or if it's the code itself.

Additionally, there are a few UI bugs in the Mafia Chat that I would have liked to clean up but ran out of time. Styling also fell by the wayside to some extent. Generally, my approach is functionality then styling, so with the time crunch, some styling wasn't completed.

With more time, I would also figure out some way to encrypt the React state, so that tech savvy players couldn't go into the DevTools and spoil the game haha.

# Other Posts
[Initial Thoughts](https://dev.to/christianhoward/mafia-initial-thoughts-and-moving-forward--3a1o)
[Feature Building and CSS Distractions](https://dev.to/christianhoward/mafia-feature-building-and-css-distractions-3cm)
Venezuelan Migration in South America - Pusher Contest
Tags: pushercontest
Published: 2018-05-25 16:07:03

---
title: Venezuelan Migration in South America - Pusher Contest
published: true
description: An app to show the venezuelan demographic movement
tags: pushercontest
---

## What I built

I make an app to show the venezuelan demographic movement

## Demo Link

https://pusher-contest.herokuapp.com

## Link to Code

https://github.com/fransuaio/Pusher-Contest

## How I built it (what's the stack? did I run into issues or discover something new along the way?)

I use express, ejs, jquery, google maps api, pusher, moment.js
Lazy Loading😴😴 In React [Easy way]
Tags: react, javascript, webdev, frontend
Published: 2018-05-25 13:56:03

---
title: Lazy Loading😴😴 In React [Easy way]
published: true
description: Lazy Load in React Using  [react-lazy-load] Package. 
tags: react,javascript,webdev,frontend
cover_image: https://thepracticaldev.s3.amazonaws.com/i/jpg6ta3sfav2jgv8txid.png
---

**React lazy load package helps to load React component that renders children elements when they enter the viewport.**


Lets Us see the live example for that I have used iTunes API to show the how react-lazy-load works.


## [Itunes Example](http://itunes-api-s.s3-website-us-east-1.amazonaws.com/)


![](https://thepracticaldev.s3.amazonaws.com/i/nfzvgq1y40io3ctqogpz.gif)


## Where I used it?

{% gist https://gist.github.com/saigowthamr/51a24db8bdf227611faf1f630fb4684c %}


I used react lazy load component to wrap the image element. so that all images in the site doesn't fetch on the first request.

It only makes the fetch request whenever the user scrolls to that position.


## [Code Repository](https://github.com/saigowthamr/Itunes-Top-100-albums)

## [Live Example](http://itunes-api-s.s3-website-us-east-1.amazonaws.com/)




**Other Interesting Stuff**

### [How To implement Lazy Loading in Angular 6📯📯](https://dev.to/saigowthamr/how-to-implement-lazy--loading-in-angular-6-3ple)
Some of my Favorite Software Technology Books
Tags: books, pragmatic, reading, learning
Published: 2018-05-25 13:34:22

---
title: Some of my Favorite Software Technology Books
published: true
description: Favorite tech books.
tags: books, pragmatic, reading, learning
---

These are some of my favorite technology, software and programming books:
# [The Pragmatic Programmer](https://www.amazon.com/Pragmatic-Programmer-Journeyman-Master/dp/020161622X)
*(Andrew Hunt, David Thomas)*

This is one of my favorite programming books of all-time. The topics in it are obvious, perhaps even simple, but the advice is value and, well, practical. The book is short, fun-to-read and always worth revisiting and is the inspiration for a video I did: <a href="http://developer.xojo.com/webinar-the-pragmatic-programmer">The Pragmatic Programmer</a>.

{%youtube XKZf3_lFLZk%}


# [Eric Sink on the Business of Software](https://www.amazon.com/Eric-Business-Software-Experts-Voice/dp/1590596234)
*(Eric Sink)*

Eric is the founder of SourceGear, the makers of Vault version control software.Â This an excellent collection of Eric’s writings from his blog and MSDN, which is mostly business-focused.

# [Code Complete](https://www.amazon.com/Code-Complete-Practical-Handbook-Construction/dp/0735619670)
*(Steve McConnell)*

A good book on coding standards, techniques and other things. I've [had a few things to say about coding standards](https://blog.xojo.com/2016/02/09/tip-coding-guidelines/) from time to time.


# [Programmer’s at Work](https://www.amazon.com/Programmers-at-Work-Susan-Lammers/dp/0914845713)
*(Susan Lammers)*

This book is an oldie from the 1980's and has some interesting tales from early pioneers in the software industry.

# [Joel on Software](https://www.amazon.com/Joel-Software-Occasionally-Developers-Designers/dp/1590593898)
*(Joel Spolsky)*

A collection of great articles from Joel Spolsky’s [Joel on Software web site](https://www.joelonsoftware.com). These articles are getting a bit dated, but Joel is a great writer so they are always fun to read.

# [Getting Real](https://www.amazon.com/Getting-Real-Smarter-Successful-Application/dp/0578012812), [Rework](https://www.amazon.com/Rework-Change-Way-Work-Forever/dp/0091929784), [Remote: Office Not Required](https://www.amazon.com/Remote-Jason-Fried-Heinemeier-Hansson/dp/0091954673)
*(Jason Fried and David Heinemeier Hansson)*

These three books are great short reads and offer useful advice on how to work in the modern software development world. [Getting Real is also available for free](https://gettingreal.37signals.com) online.

What are your favorite software-related books?
Redux or MobX for ReactJS?
Tags: redux, react, mobx, discuss
Published: 2018-05-25 11:56:00

---
title: Redux or MobX for ReactJS?
published: true
description: State management ReactJS
tags: Redux,React,MobX,discuss
---
Hello, I am new in ReactJS and I just heared that using state management will make our life easier. I am asking what is good MobX or Redux for me that is newbie in ReactJS, and why?
file_get_contents depend on previous calls when using a proxy
Tags: php, proxy
Published: 2018-05-25 11:49:50

---
title: file_get_contents depend on previous calls when using a proxy
published: true
description: if you do two `file_get_contents` in a row, the 2nd one depends on the 1st one if you use a proxy server.
tags: #php #proxy
cover_image: https://thepracticaldev.s3.amazonaws.com/i/5qqopkmqa3qu8y0g97qr.jpg
---
quite interresting, that if you do two `file_get_contents` in a row, the 2nd one depends on the 1st one if you use a proxy server.

running the following script:

    <?php
    $stream_default_opts = array(
      'http'=>array(
        'proxy'=>"tcp://5.9.78.28:3128",
        'request_fulluri' => true,
      )
    );


    stream_context_set_default($stream_default_opts);

    file_get_contents("https://www.google.com", false); 
    file_get_contents("https://getcomposer.org", false); 

leads to:

    PHP Warning:  file_get_contents(https://www.google.com): failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found
     in foo.php on line 21
    PHP Warning:  file_get_contents(): Peer certificate CN=`getcomposer.org' did not match expected CN=`www.google.com' in foo.php on line 22
    PHP Warning:  file_get_contents(https://getcomposer.org): failed to open stream: Cannot connect to HTTPS server through proxy in foo.php on line 22


ignore the 404 part, its just the public proxy i used for this demo. i get the error (the peer certificate error) when using my proxy (but not the 404 of course)

- first posted at: https://www.reddit.com/r/PHPhelp/comments/8ai694/file_get_contents_depend_on_previous_calls_when/
- https://stackoverflow.com/a/49717338
- bug reported: https://bugs.php.net/bug.php?id=76196
- cover image by Gratisography https://www.pexels.com/photo/woman-dropped-fail-failure-4091/