teleren/devto huggingface dataset:
Do you have nice examples of refactoring code?
Tags: discuss, refactoring, code, review
Published: 2018-06-12 19:15:49

---
title: Do you have nice examples of refactoring code?
published: true
description: I am looking for code samples that you refactored.
tags: #discussion #refactoring #code #review 
---

I am looking for code samples that are good examples of how to refactor code. I would be the happiest if you could provide the code both before and after the refactorings. I am interested in any language, but Java and Python is preferred.

Why? I am planning to make a meetup on the topic and I would need a good base for it. 

(I know that there are a lot of stuff out there like refactoring.guru, etc, but I am interested in real-life code samples! :) Also, I have a big bunch of code from our codebase, but I hope you might have even more interesting samples! )

Any help is appreciated! :)
What are some tips for working remotely, on the road?
Tags: discuss, devtips, productivity
Published: 2018-06-12 18:02:35

---
title: What are some tips for working remotely, on the road?
published: true
description: 
tags: discuss, devtips, productivity
---

Once in a while, I find myself working not just remotely, but away from the comfort of my home office (and speedy internet connection!)

I'm typically in the NYC area in these cases, and it's been my experience that it's impossible to find a place with cell phone reception, outlets, usable internet AND peace and quiet. I know, high maintenance.

It seems none of the big co-working spaces are welcoming to the occasional drop-in member.

Do some of the more traveled dev.to users have tips for when you're on the road and looking to dig in to work / take calls?

(Edit: worth noting that I don't own a vehicle, Amtrak / Megabus are the main modes of transportation.)


For me, I know having a spare USB battery pack charged at most times has been a life saver time and time again.
How to deal with resume gaps due to mental illness while job hunting?
Tags: anonymous, discuss, career
Published: 2018-06-12 17:35:48

---
title: How to deal with resume gaps due to mental illness while job hunting?
published: true
tags: anonymous, discuss, career
---

_This is an anonymous post sent in by a member who does not want their name disclosed. Please be thoughtful with your responses, as these are usually tough posts to write. Email sloan@dev.to if you'd like to leave an anonymous comment._

If there's a big timeline gap in education and experience because of psychological issues, how do I best deal with that on my resume and while talking to potential employers? Do I just avoid adding years at all, or do I leave them in? Any other experiences in job-hunting where similar issues came up?
Improving SendGrid’s Open Source Software Development Kit: PHP Edition
Tags: company, technical
Published: 2018-06-19 17:10:42

---
title: Improving SendGrid’s Open Source Software Development Kit: PHP Edition
published: true
tags: Company,Technical
canonical_url: https://sendgrid.com/blog/improving-sendgrids-open-source-software-development-kit-php-edition/
---

SendGrid's Developer Experience team recently overhauled the PHP software development kit to support v3 of the SendGrid API.

The post [Improving SendGrid’s Open Source Software Development Kit: PHP Edition](https://sendgrid.com/blog/improving-sendgrids-open-source-software-development-kit-php-edition/) appeared first on [SendGrid](https://sendgrid.com).
Mars: Improving Modern Concepts
Tags: aerospatial, hardware, software, craftmanship
Published: 2018-06-12 17:14:08

---
title: Mars: Improving Modern Concepts
published: true
description: Experiences about improving technology for improvement models
tags: #aerospatial #hardware #software #craftmanship
---
<body>
    <div>
      <a href="/"><img class="details" src="https://thepracticaldev.s3.amazonaws.com/i/qzyhdckcxumlz8vhv19b.png"/></a>
    </div>
      <p>Credits NASA/Calltech/JPL</p>
      <p>Scout has new concepts for space exploration drones, that can be improved with new concepts: The Doroon Max Pro</p>
      <p> Reducing 220W of power needed to 154W, Installing an aerostatic body, where aerogel is made with Hellium, to protect the core processor/control/Energy Cell, Increasing the solar radiation with lightweight concentrators. This is my personal challenge that I share with everybody.
      <p>
</body>
Music for learning
Tags: music, learning, focus
Published: 2018-06-12 16:52:35

---
title: Music for learning
published: true
tags: music, learning, focus
canonical_url: http://christine-seeman.com/2018/06/music-for-learning/
---

![](http://christine-seeman.com/wp-content/uploads/2018/06/Dive_tycho_album.jpg)

So picture this, you are sitting down at your desk, loaded up your tutorial, terminal, editor and have muted all your slack channels, you are ready to go.  But now you have to figure out something to listen to so you can tune out everyone in your open office, but what should you load up?

For me, I need something with no lyrics.  I have a hard time concentrating and really being able to focus when I hear other words.  So sometimes browsing on Amazon for a new playlist can be frustrating. EDM really is hit or miss, things that you don’t thing should have vocals end up having them.  There needs to be a no-lyrics tag, some way to make focus playlists more searchable.  Right now my go-to is Tycho, really anything by him.  Although, today I was trying to listen to the [Past is Prologue](https://en.wikipedia.org/wiki/Past_Is_Prologue_(album)) album but it kept on making me think that my streaming service was encountering some lag or other glitch, maybe this is just me? I also am a fan of Brian Eno, but sometimes you just want something more uptempo.

![](https://media.giphy.com/media/3o7abLPoFq6adq1h9m/giphy.gif)

Any suggestions for good focus music?

Edit: Here's a [Spotify playlist](https://open.spotify.com/user/y1vr86k0gjoljnloa3wo7ksnu/playlist/7ssrdXuEBnhwnvQAmzbiRx?si=4dQPjwqSTxacVuK_Xg6IVg) I have started with some suggestions, and my favs. 

Follow-up (7/24/18): I forgot to mention [Bolling: Suite for Cello and Jazz Piano Trio](https://open.spotify.com/album/0dXur3OpKCed4QA6lKzmMv?si=oqFVOAvTS9exKmJ3Z-LsIQ) and Deus Ex soundtracks. Both have been in rotation lately, along with my all time favorite 2112 by Rush, and the Spirited Away soundtrack by Joe Hisaishi.
April Update isn't good for Office 365 Solo
Tags: microsoft, office
Published: 2018-06-12 15:52:57

---
title: April Update isn't good for Office 365 Solo
published: true
description: 
tags: Microsoft,Office
---

##The reason why you should not update windows

I applied April Update to Windows. Then the Office 365 Solo has stopped moving at all. I tried it over and over but the subscription is not recognized. It was solved by inevitably lowering the build to the previous version. Of course. Because it was usable until now.

From this I learned that I should not update for Office. I need Office for work. So I don't Update windows. If You need Office for work, I recommend not updating.
Basic flexbox helper classes with SCSS
Tags: tutorial, css, flexbox, devops
Published: 2018-06-12 15:47:49

---
title: Basic flexbox helper classes with SCSS
published: True
description: Flexbox helper classes with SCSS
tags: #tutorial #css #flexbox #devops
---
Flexbox is a very powerful CSS specification for layout. Though it is sometimes used for large scale page layouts, flexbox is most suited to smaller scale layouts, such as individual components. If you're using flexbox in this way, you may find yourself writing the same rules over and over. We're going to look at a few basic helper classes that can make adding flexbox to your components a bit quicker. These classes don't provide every possible flexbox rule, rather just the basic ones that I find I use most often. I find that classes like these are often useful for small things, like matching the heights of a row of elements, and vertically centering their contents.
```
I'm using SCSS here for brevity, but you could easily write the same classes in regular CSS.

.flex-parent { // Add this class to create a flexbox parent
  display:flex;
  &.flex-direction-column { // This changes the layout direction from the default horizontal to vertical
    flex-direction:column;
  }
  &.justify-content-center { // This centers the parent's children along the main axis (horizontal by default, vertical if the parent has the  flex-direction-column class)
    justify-content:center;
  }
  &.align-items-center { // This centers the parent's children along the cross axis
    justify-content:center;
  }
  &.flex-wrap-wrap { // This allows the children to wrap as needed
    flex-wrap:wrap;
  }
  @for $i from 1 through 12 { // Here we loop through numbers 1 to 12, generating flex child classes for each number, eg. .flex-1, .flex-2 etc.
    .flex-#{$i} {
      flex:$i;
    }
  }
}
Here is an example of a component layout using our flexbox helper classes:

<div class="flex-parent">
  <div class="flex-1 flex-parent flex-direction-column justify-content-center">1</div>
  <div class="flex-2 flex-parent flex-direction-column justify-content-center">2</div>
  <div class="flex-3 flex-parent flex-direction-column justify-content-center">3</div>
  <div class="flex-4 flex-parent align-items-center">
    <div class="flex-parent flex-direction-column">
      <div class="flex-1">row 1</div>
      <div class="flex-1">row 2</div>
      <div class="flex-1">row 3</div>
    </div>
  </div>
</div>
```
For information on vendor prefixes for flexbox, click [here](http://ptb2.me/flexbox/), but I highly reccommend using a tool like [Autoprefixer](https://github.com/postcss/autoprefixer) so you don't need to worry about them.
CI tools for bundle size comparisons?
Tags: discuss, javascript, angular, travisci
Published: 2018-06-12 15:29:26

---
title: CI tools for bundle size comparisons?
published: true
description: 
tags: discuss, javascript, angular, travisci
---

I'm starting a new project at work and as part of that we want our Travis CI to check if our bundle size has grown larger than expected. 
Tools I've earmarked thus far are [size-limit](https://github.com/ai/size-limit) and [bundlesize](https://github.com/siddharthkp/bundlesize), but I thought I would reach out to see if anyone else has had success with different tools.
Real-Time Charts using Angular, D3, and Socket.IO
Tags: angular, javascript, socketio
Published: 2018-06-12 15:05:00

---
title: Real-Time Charts using Angular, D3, and Socket.IO
published: true
description: Learn how to use Angular, D3, and Socket.IO to build an application that provides real-time charts to its users.
tags: #angular #javascript #socketio 
canonical_url: https://auth0.com/blog/real-time-charts-using-angular-d3-and-socket-io/
---

Charts create some of the most catchy sections on any business applications. A chart that updates in real time is even more catchy/useful and adds huge value to users. Here, you will see how to create real-time charts using Angular, D3, and Socket.IO.

[Read more 🅰️📊](https://auth0.com/blog/real-time-charts-using-angular-d3-and-socket-io/?utm_source=dev&utm_medium=sc&utm_campaign=charts_angular_socketio)

![Real-Time Charts using Angular, D3, and Socket.IO](https://thepracticaldev.s3.amazonaws.com/i/y1man8k61s5nedaqckyl.png)
How to make your enterprise impressive with Liferay intranet? 
Tags: liferay
Published: 2018-06-12 12:21:45

---
title: How to make your enterprise impressive with Liferay intranet? 
published: true
description: 
tags: liferay
---
[How to make your enterprise impressive with Liferay intranet?](https://www.aimprosoft.com/blog/how-to-make-your-enterprise-impressive-with-liferay-intranet/)

Intranets leaped at the chance to play a pivotal role as the most suitable communicative systems for the last several years. They are nicely welcomed by both enterprises and small companies being similar to the Internet except for their special access permissions merely to employees within the company.

**Siri, what is an intranet?**
An intranet is defined, best of all for understanding, as resources available only inside of the corporate network. It is implemented for internal communications mostly with different levels of permissions. There are various portal-like systems that are commonly used by enterprises to handle its operation:

local bug tracking;
continuous integration server;
VCS server (Git, Mercurial, SVN, TFS, Perforce, etc.);
local news portal;
online user management;
HR management etc.
Every system could be developed on a proper platform, except some narrowly specialized resources such as Jenkins, GitLab, JasperReports server, Redmine, etc. At the same time, all of them, typically enough, might become combined under one umbrella by means of Liferay.

Company-wide features:

notifications;
knowledge bases (wikis);
forums;
database;
documents open to general use.
Personal account features:

profile settings;
calendar management, scheduling;
vacation and salary management;
human resources tools etc.
Debugging Asp.Net Core 2 apps in Azure
Tags: net, development, aspnet, azure
Published: 2018-06-12 13:12:18

---
title: Debugging Asp.Net Core 2 apps in Azure
published: true
tags: .net,development,asp.net,azure
canonical_url: https://craignicol.wordpress.com/2018/06/12/debugging-asp-net-core-2-apps-in-azure/
---

I’ve been getting under the skin of Asp.Net Core 2 following a failed experiment with Asp.Net Core v1. I certainly found .Net standard and the associated framework support to be very welcome, and unlike my previous project we didn’t need to support GDI or SignalR libraries, so it’s much more in the Core sweet spot.

I’ll talk about the project and the technologies involved in some follow up posts, so if you’ve got any real-world questions on Asp.Net core, React/Redux with Typescript, or CosmosDb in C#. let me know and I’ll try and address them as I get to those technologies.

For now, though, I want to start with the basics. Asp.Net core on Azure works great, mostly, but if something goes wrong in Startup.cs, there’s no Application Insights, a generic 502.5 IIS error – which just means it can’t talk to Kestrel, and no web logs to help you. So before you deploy to Azure, do yourself a favour and add the following to _web.config_ so you’ve got logs to help you.

`<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" arguments=".\web.api.dll" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="true" />
</system.webServer>`

That way, if you do see a 502.5 error on your site, you can jump into Kudu and start reading the logs. They can grow quite quickly, depending on your web app lifecycle settings, so you may benefit from a regular cleanout of your logs folder.

If the logs still aren’t helping, or you don’t understand what you’re seeing, [there’s a nice Asp.Net core 2 troubleshooting guide over at MSDN, but not all of it applies to Azure](https://blogs.msdn.microsoft.com/rohithrajan/2018/03/13/500-19-error-or-502-5-error-when-hosting-asp-net-core-2-application-inside-iis/).
Applications of Lambda in Ruby.
Tags: ruby, rails, lambda
Published: 2018-06-12 14:17:33

---
title: Applications of Lambda in Ruby.
published: true
tags: ruby, ruby on rails, lambda
canonical_url: http://jetrockets.pro/blog/lambda
---

Thoughts about lambda in Ruby.

[http://jetrockets.pro/blog/lambda]
(http://jetrockets.pro/blog/lambda)
WooCommerce Geolocation Based Products
Tags: woocommercegeoip
Published: 2018-06-12 09:31:19

---
title: WooCommerce Geolocation Based Products
published: True
description: WooCommerce geolocation based products help you to hide the specific products and categories for users belongs to particular region or country. 
tags: WooCommerce Geoip
---
<img src="https://thepracticaldev.s3.amazonaws.com/i/vk1y6do0a0si10tiwii7.png">

WooCommerce geolocation based products help you to hide the specific products and categories for users belongs to particular region or country. These users will be unable to see specific products on your e-store, however, you can use the whitelist to allow some users to see your products. <b><a href="https://codecanyon.net/item/woocommerce-geolocation-plugin-ip-based-products-filter/22022059">WooCommerce geolocation based products</a></b> plugin also enables you to block the whole store for users. You can also import the GeoIP database to your e-store with the help of this plugin. It cost you only $39.

<b>Screenshots</b>

<img src="https://thepracticaldev.s3.amazonaws.com/i/y500qjieuqwdocfdbt3x.png">

<img src="https://thepracticaldev.s3.amazonaws.com/i/zgqvup6l1tkfpkk2kz6t.png">

<img src="https://thepracticaldev.s3.amazonaws.com/i/osqumu177j87b4tuab6n.png">

<img src="https://thepracticaldev.s3.amazonaws.com/i/62gbcxci9210svd15pu6.png">
Making my framework a Composer framework
Tags: composer, php, discuss
Published: 2018-06-12 09:22:55

---
title: Making my framework a Composer framework
published: true
description: I made a PHP framework for 7.x or above; I'd like to find out how to make it a Composer framework.
tags: Composer, PHP, discuss
---

Over the past two years or so, I've been developing a PHP 7 framework, firstly as a teaching tool and then used for commercial projects. A colleague of mine told me that I could add it to Composer, which I hardly ever use because I find where I have worked on projects that use Composer, those projects have tended to have Composer packages installed that are not used anywhere. It has also made them bloated and more heavy-weight that they ought to be. Many of those Composer packages I could easily build myself fairly easily, and in doing so I have control of the source and quality of the scripts. And finally I learn more by working things out for myself.

Anyway, aside from this, Composer would give my framework more exposure. So how do I go about adding it to Composer?

My framework is currently available at 

#### https://github.com/sbebbers/FrameWork.php/releases


{% github sbebbers/FrameWork.php %}


Many thanks in advance.
Help the progress of BitBulb
Tags: discuss, webdev
Published: 2018-06-12 08:37:42

---
title: Help the progress of BitBulb
published: true
description: Help Bitbulb grow
tags: discuss, webdev
---

Need help with reaching more users to go to BitBulb

I have already posted a post on here asking for improvements, which can be found here.
If you think the site needs improvement in any way please post there, I am always checking up on it and fixing the problems that people are pointing out to me.

Anyways, although I am improving the site I am struggling with promoting it and getting users to visit and use the site.

Does anyone have any tips or advice?
What ambient noise generators do you use?
Tags: discuss, ambientnoise, listento
Published: 2018-06-12 08:31:37

---
title: What ambient noise generators do you use?
published: true
description: After falling in love with using ambient noise generators while I code, I want to know what other ones are out there.
tags: discuss, ambient noise, listen to
---

So I have recently found that switching to ambient noise generators helps me focus heaps. After seeing a few posted on posts such as [this one](https://dev.to/ben/whats-playing-in-your-headphones-while-you-code) I blew off the idea as I did not like it at the time. Now fast forward six months I have found them to be absolutely brilliant.

So, in the hopes I can also find some that I saw early on but can not find now with city sounds and such, what ambient noise generators do you use?
My programming journey: Learning math!
Tags: productivity, beginners, career, discuss
Published: 2018-06-12 03:07:43

---
title: My programming journey: Learning math!
published: true
description: About six months ago I made the decision of breaking into graphics programming. And with that came the realization of learning math.
tags: #productivity #beginners #career #discuss
---

I am posting a little late this week. I have been busy with a million other things. But this week I wanted to discuss my journey to learning math. And my advice for you all that would like to break this barrier. So with that said let's get this going. 

About six months ago I made the decision of breaking into graphics programming. And with that came the realization of learning math. And this was a something at the time I dreaded. Because I was really bad at math. Which leads me to my first point in this post. If you want to learn something doesn't matter if its math or programming or whatever. Just because you were bad at something once. Does not mean you suck at it. It just means you need to find a better way of learning how to do it. And that was exactly what I have found 6 months later. Because I have covered up to algebra2 thus far. And will soon be moving into precalculus etc. And this is something that I never in my life thought I would be able to do.

So my next piece of advice is going to have patience because at first things are going to be slow. And it may be confusing but don't give up just keep going. I was lucky enough to have my brother tutor me and still is. Which has been helping me a lot? I also want to say when you are looking for a place to start learning the best to resources would have to be Kahn academy. And books but not just any books I personally have been reading them for dummy series books. As it teaches the concepts you need without completely over complicating it. I also tend to use these two methods mixed with different youtube videos depending on what it is I am wanting to learn. I also have taken and bought workbooks as well to go with the main reading. This way I can retain what it is iam learning.

I have found that by removing the aspects of school and going at my own pace. I have been able to learn a whole lot more. Another thing that I have been doing that has been killing two birds with one stone. Is taking the concepts I have been studying math and applying them to programming projects to help me learn c++. Which has been really interesting because it allows me to solidify what I have been learning even further.

So this is how I have been able to get where I am at thus far. I still have a while to go. But if there is anything to take away from all of this. It stay postive. Know that you can do it you just have to find the way that works for you. And keep on pushing forward. 

Also you can see my latest project here:

{% github gwartney21/CompleteTheSquare %}

With that said thank you for reading and I will see you all next week.