teleren/devto huggingface dataset:
Tax on Mutual Fund Returns
Tags: learn, debtfunds, elss, equityfunds
Published: 2018-09-17 19:18:46

---
title: Tax on Mutual Fund Returns
published: true
tags: Learn,Debt Funds,ELSS,Equity Funds
canonical_url: 
---

Many mutual fund investors have questions about how the income obtained from Mutual Funds are taxed. Well, the fact is the taxation varies for various mutual fund schemes. This article targets the budding investors and tries to explain the tax rates applicable on fund returns for equity and debt mutual fund schemes in simple terms. […]

The post [Tax on Mutual Fund Returns](http://mfrepublic.com/tax-on-mutual-fund-returns/) appeared first on [Mutual Fund Republic](http://mfrepublic.com).
GitHub ditched jQuery
Tags: javascript, web
Published: 2018-09-08 14:09:43

---
title: GitHub ditched jQuery
published: true
description: 
tags: javascript, web
---

On the heels of this earlier discussion about JavaScript and progressive enhancement

{% link https://dev.to/ben/should-browsers-still-allow-users-to-disable-javascript--211d %}

I found it refreshing to read about the migration away from jQuery that GitHub successfully completed recently: [Removing jQuery from GitHub.com frontend](https://githubengineering.com/removing-jquery-from-github-frontend/).

They did it incrementally for obvious reasons, leveraging modern browsers and (lots) of polyfills. It seems they haven't used Babel at all.

Two paragraphs of the article stuck with me the most:

> As part of our refined approach to building frontend features on GitHub.com, we focused on getting away with regular HTML foundation as much as we could, and only adding JavaScript behaviors as progressive enhancement. As a result, even those web forms and other UI elements that were enhanced using JS would usually also work with JavaScript disabled in the browser. In some cases, we were able to delete certain legacy behaviors altogether instead of having to rewrite them in vanilla JS.

> Our general philosophy of striving for progressive enhancement extends to custom elements as well. This means that we keep as much of the content in markup as possible and only add behaviors on top of that. For example, <local-time> shows the raw timestamp by default and gets upgraded to translate the time to the local timezone, while <details-dialog>, when nested in the <details> element, is interactive even without JavaScript, but gets upgraded with accessibility enhancements.

[Progressive enhancement](https://alistapart.com/article/understandingprogressiveenhancement) is a concept at least ten years old and I'm glad more and more people are keeping it in mind. 

On a side note I just noticed the feed on GitHub's homepage doesn't appear at all with JavaScript disabled :D
ClassicPress: A call for developer volunteers
Tags: wordpress, opensource, php
Published: 2018-09-08 09:33:29

---
title: ClassicPress: A call for developer volunteers
published: true
description: API experts, automation experts (specifically in testing) and #WordPress core developers
tags: WordPress, Opensource, PHP
---

A call for volunteers: API experts, automation experts (specifically in testing) and WordPress core developers. We're accelerating work on the infrastructure side of ClassicPress and we need more hands on deck! 

Email scott@classicpress.net and please share with anyone you think would be interested!

Thank you for your support :)
Is Go an Object Oriented language?
Tags: go, showdev, opensource, productivity
Published: 2018-09-08 11:34:45

---
title: Is Go an Object Oriented language?
published: true
description: You will learn the difference between a Class and a Struct, Value vs Pointer Receiver and find out if to write OO Go.
tags: go,showdev,opensource,productivity
cover_image: https://rablater.sirv.com/Images/GophersLand/gopher_vs_object_oriented_golang.jpg
canonical_url: https://medium.com/gophersland/gopher-vs-object-oriented-golang-4fa62b88c701
---

**UPDATE:** I updated the article with provided extra research on OOP therefore I am removing it from here, damn code duplication and continue in the original [Medium article please](https://medium.com/gophersland/gopher-vs-object-oriented-golang-4fa62b88c701#38b0)!

----
LF: Network of Beginner Devs
Tags: beginners, webdev
Published: 2018-09-07 20:56:15

---
title: LF: Network of Beginner Devs
published: true
description: 
tags: beginner, webdev
---

Hi! I'm Andrew, a junior developer hired straight out of a summer internship I took, with no prior experience in web development. 
This was a wild ride, and I have so much more to say about it, but that's a story for another time.

###Long story short: ~~I suck at webdev,~~ I'm new to webdev
My goal is to learn as quickly and as effectively as possible. I want to be a better dev, and I think this is a goal that all of us on #beginner share.

But I think learning can be a bit of a lonely journey, and like most things, is better with friends.

###So Let's be Friends!
That's why I'm trying to create a personal network for beginner devs. The goal here is to create a group of people that are genuinely interested in making friends and helping each other succeed. This isn't so much about getting advice, but rather: learning together, complaining together, and progressing together.

SO, if you're interested in progressing alongside or advising another beginner developer, feel free to join [this](https://gitter.im/andrews-network/general?utm_source=share-link&utm_medium=link&utm_campaign=share-link) gitter channel I just made.

Or, if you know of any other communities for people like me, feel free to share!
I love to document my code. Am I doing it wrong?
Tags: code, documenting, discuss
Published: 2018-09-08 11:17:51

---
title: I love to document my code. Am I doing it wrong?
published: true
description: Discussion about documenting the code.. or not.
tags: #code, #documenting, #discuss
cover_image: https://thepracticaldev.s3.amazonaws.com/i/2c0xz5wg56m6xeziyyov.jpg
---

I've been saved countless of times by people who document their code, and also doomed by people who doesn't. At some point I just started to love comments, even the most redundant ones. **I strongly believe that a comment is never wrong, unless outdated or misleading**.

Sadly not much people seems to like this stance. Instead of documenting our functions, we rely on the naming convention and writing expressive code to figure out the `what` and the `why` of any code. Sometimes we even have aesthetic troubles with it, as if the comments were distracting us from the code itself.

I like to write expressive code, but I don't see it as a replacement of proper documentation.

Am I doing it wrong?
Let's put the current iTunes track into the Tmux status line
Tags: tmux, bash, commandline, linux
Published: 2018-09-08 10:57:52

---
title: Let's put the current iTunes track into the Tmux status line
published: true
description: What is the name of that bangin' choon?
tags: tmux, bash, commandline, linux
canonical_url: https://michaelwelford.blog/post/lets-put-current-itunes-track-tmux-status-line
cover_image: https://thepracticaldev.s3.amazonaws.com/i/5fk9cic2ve44psgm2g02.png
---

When you go _full terminal_ it can be nice to know what music is playing for when it really sucks/rocks. Wouldn't it be nice to get something like this into your Tmux status bar:

![tmux status](https://thepracticaldev.s3.amazonaws.com/i/zqsv4bhmtbo115rsojx3.png)

(the answer is _yes_)

## Let's do this

First you need to get the following into a script file, let's say we put this into `~/.config/itunes_status.sh`.

```bash
#!/usr/bin/env bash

ITUNES_TRACK=$(osascript <<EOF
if appIsRunning("iTunes") then
  tell app "iTunes" to get the name of the current track
end if

on appIsRunning(appName)
    tell app "System Events" to (name of processes) contains appName
end appIsRunning
EOF

if [[ ! -z "$ITUNES_TRACK" ]]; then
  ITUNES_ARTIST=$(osascript <<EOF
  if appIsRunning("iTunes") then
      tell app "iTunes" to get the artist of the current track
  end if

  on appIsRunning(appName)
      tell app "System Events" to (name of processes) contains appName
  end appIsRunning
EOF

  TRACK_LEN=${#ITUNES_TRACK}
  if [[ "$TRACK_LEN" -gt 30 ]]; then
    ITUNES_TRACK=`echo "$ITUNES_TRACK" | cut -c -30`
    ITUNES_TRACK+=...
  fi

  ARTIST_LEN=${#ITUNES_ARTIST}
  if [[ "$ARTIST_LEN" -gt 20 ]]; then
    ITUNES_ARTIST=`echo "$ITUNES_ARTIST" | cut -c -20`
    ITUNES_ARTIST+=...
  fi

  echo '#[fg=#99a4bc]♫#[fg=#b4b4b9]' "$ITUNES_TRACK" '#[fg=#787882]-#[fg=#b4b4b9]' "$ITUNES_ARTIST"
  exit
else
  echo "#[fg=#787882]No music playing"
fi
```

Essentially this does the following:

- Check if iTunes is running, and if so grab the name of the track
- If we have a track name, also grab the artist
- If the track name is over 30 characters in length, truncate and insert an ellipsis
- If the artist name is over 20 characters in length, do the same
- Output this with some colours and space it out
- Otherwise write "No music playing"

## Insert into the Tmux status bar

Ok, so that's nice an' all but we need to get that into the Tmux status. That can be accomplished by inserting something like the following into your `.tmux.conf`:

```bash
set -g status-right "#(~/.config/itunes_status.sh) #[fg=#57575e]│ #[fg=white]%d/%m/%Y %H:%M "
```

**Note** as a "bonus" I have also put in the time after the iTunes track (yes, yes, such a generous bonus). If you are wondering what those colour hex values are, they come from the [falcon](https://github.com/fenetikm/falcon) theme (made by moi). Don't forget that you will need to make this script executable too.
Few Random Interview Tips
Tags: interview, tips
Published: 2018-09-08 07:24:35

---
title: Few Random Interview Tips
published: true
description: This is a random post that I am using to share my limited experience of attending some interviews and also being at the other as an interviewer.
tags: #interview #tips
---

This is my first and a random post that I am using to share my limited experience of attending some interviews and also being at the other as an interviewer.

##*Being nervous is fine*

It's perfectly reasonable and fine being nervous during an interview. The environment is strange, people are new and everything may be out of your comfort zone. While it is true that _'First impression is best blah blah'_ but if you can get over your nervousness during the course of the interview, many do ignore and understand your initial nervousness.

**Tip:** If you search on the internet, you will find a dozen suggestions for a dime, but the simplest thing that you can do to limit your nervousness is to get to the interview venue ahead of time. This gives time to relax, get comfortable with the environment and get in your zone before the interview. A habit that I have developed from past few years is to go to the interview venue before a day so that I can figure out logistics, etc. This helps me in planning my travel better on the day of the interview and I am not stressed to reach the interview on time.

##*Have some water before beginning*

You may not have followed the tip to reach early, but it's usually not a great idea practically to start your interview as soon as you arrive. You are already late and a couple of more minutes is not going to make things much worse. Excuse yourself and have a glass of interview. This gives you time and space to calm yourself down.

##*Don't be afraid to ask them to repeat*

Often times I have seen people not listening to the question properly and sometimes even scared while asking someone to repeat the question. There is no harm in asking someone to repeat their question. Consider the flip side, you do not understand the question, assume something and answer something that makes no sense to the actual question being asked :)

##*You are not supposed to know everything*

This again is my personal opinion but if you do not know something or have not got chance to work on something while being asked in interview, you can simply state the same and explain whatever you know. This atleast earns honestly and integrity points in my book plus remember _'Nobody can know everything'_. There is always scope to learn and improve.
When do you create a function or method?
Tags: discuss
Published: 2018-09-08 05:30:04

---
title: When do you create a function or method?
published: true
description: when do you create a function/method
tags: discuss
---
It comes naturally to create a function whenever needed, that should be true for all developers. But we all have different standards on when we create methods. 

Are you creating a function/method when:
 * the current one exceeds a certain number of lines, or a certain complexity? 
 * or do you just pile all the code in one giant function until you can't see the scrollbar?
 * do you create them based on readability?
 * what about re-usability?

Leave your answers below! It would be very interesting to see the differences we have on this subject.
Java Developer Litmus Test Part 1
Tags: java, career, beginners, test
Published: 2018-09-08 04:38:17

---
title: Java Developer Litmus Test Part 1
published: true
description: Explore how you can test an applicants Java skills beyond the surface.
tags: #java #career #beginner #test
---

How do you get a useful idea of the skill level of a Java developer? There are of course many options to test basic knowledge of Java. More advanced tests might get into specific technologies. This test is different. It is designed not simply to test recall of facts, but rather test problem solving ability. It is not a speed test, the task outline is reasonably simple and a period of one day is specified. Any Java capable developer will be able to complete the test in much less than this. This is also not a 'trick' test, in that there are no obscure bugs trying to trick developers. Neither is any technology outside Java and some basic Spring used.

This week I am posting the test itself for those who want to take a look and perhaps try it out themselves. Next week I will be posting an example solution and the text notes that will allow you to evaluate applicant solutions.

The reason I am posting it here is because I am interested in whether this style of test will be generally useful, both for testing applicants for Java positions and for teaching new developers through example. It will be a jumping off point for a larger discussion of what we value in developer skills. And perhaps I'm simply barking up the wrong tree :-)

---
<h3>Instructions to Applicant</h3>

Vladimir Antanov has fled the country with his girlfriend Sonya. My company employed Antanov to maintain our critical communication systems. We urgently need to add a new feature the the existing software, and knowing you are a Master Java Developer we have chosen you to modify the software to communicate with our new clients.

Please find attached the project and source code. Currently the system processes notifications and sends them to email, database or a web service. We need to add another endpoint - JMS.

The JMS connection requires configuration details:

Server Name
Port
Queue Name

You have one day to create a new fork of the project and apply your changes. Once complete please post the URL for your fork in the comments below. You can find the repository here:

https://git.nzoss.org.nz/FeynmanFan/poorexample

Note: We don't expect an actual JMS connector - follow the same pattern as the existing senders which simply output to the console.
I'm an Expert in Memory Management & Segfaults, Ask Me Anything!
Tags: ama, cpp, c, programming
Published: 2018-09-08 04:19:04

---
title: I'm an Expert in Memory Management & Segfaults, Ask Me Anything!
published: true
tags: ama, cpp, c, programming
cover_image: https://thepracticaldev.s3.amazonaws.com/i/i0lw3rop98lcuq5i7q9e.jpg
---

I'm an expert-level C and C++ developer, with a specialty in memory management. I have experience writing memory-safe code with both the modern *safe* techniques and the ancient *unsafe* techniques. I've used `malloc` and `free` without killing myself. I love pointers. I've debugged more than my share of undefined behavior, and [authored the canonical StackOverflow question on segfault debugging](https://stackoverflow.com/questions/33047452/definitive-list-of-common-reasons-for-segmentation-faults).

**Any burning questions about dynamic allocation, undefined behavior, pointers, memory safety, or anything even remotely related? Ask me anything!**

(My main languages are C++, C, and Python, although I also deeply grok the underlying computer science principles.)
Can you create the great Redux store?
Tags: challenge, redux, javascript
Published: 2018-09-08 03:46:46

---
title: Can you create the great Redux store?
published: true
canonical_url: https://www.iamdeveloper.com/posts/can-you-create-the-great-redux-store-4eo1/
cover_image: https://thepracticaldev.s3.amazonaws.com/i/usmlgnkwhg89ihcajy8f.jpg
tags: challenge, redux, javascript
---

Photo courtesy of Flickr user [Sarah Gilbert](https://www.flickr.com/photos/cafemama/69563206/in/photolist-79wHC-maGRPk-aaVmku-dsJwwH-nGgqY-qNmdr2-fQa4Kw-Vp5gx6-3S2neU-21VKjz8-jjprJk-maGNAg-nh4cjW-79AYR3-dMgwX7-jjpFTo-G9cWjj-maJKfo-9xi9bg-VqjQXQ-dC2zsp-9xm7QJ-f5sGJY-aKwu3-dTaeb1-rafFD8-7EBr7A-8UzZXG-jrYjoS-8oFX1v-7cNo2Q-73aYMU-mb3dp8-6vXYTc-7Mv56E-e82EcL-stcsn-o97FuM-tcFhC-mbidcr-aAiN87-9oiboh-63a2Gn-22fx9Bn-2wzgk-2wzmt-zj5cVn-rFdx4M-2wABU-2wAqC)

There's a great free video course on Redux from Dan Abramov on egghead.io, [Getting Started with Redux](https://egghead.io/courses/getting-started-with-redux). I highly recommend watching it.

In one of the videos in the series, [Redux: Implementing Store from Scratch](https://egghead.io/lessons/react-redux-implementing-store-from-scratch), he explains how to create the great Redux store. It's essentially what the store is, minus some edge cases etc.

Do you think you can create it from scratch without looking at the video?

This challenge isn't a who got it first kind of challenge. It's really just for you. Really try to do it without looking at the video. Once you're done, watch the video and see how close you came to the solution.
My experience with Sass
Tags: css, sass, web, dev
Published: 2018-09-08 00:39:09

---
title: My experience with Sass
published: true
description: A quick experience overview with Sass
tags: CSS, SASS, web, dev
cover_image: https://www.tayloegray.com/wp-content/uploads/2015/12/sass-vs-css.jpg
---

*Originally posted in [my portfolio](https://hamza-tam.gitlab.io).*

When reading about sass in blog posts, I saw a lot of people excited about all the features he offers. A long ago I have decided to give it a shot, give him an opportunity to see if by any chance he can solve some of my problems when writing CSS. This is my experience overview.


My main problem when writing CSS, was the difficulty of keeping everything organized, especially when the "style.css" file easily passes the thousand line mark. That quickly made me a fan of two of Sass's features: the import feature and the nesting feature. It gave me the ability to slice my CSS into smaller, clean, more organized chunks of code. When designing a website, I like to make in the form of a collection of independent blocks. With the help of Sass, my SCSS files quickly reflected this organization, and this made the maintenance of the code simple, and finding where to make a modification hustle, quickly became a thing of the past.


As for the mixins, they are useful but not as much as the auto-prefixing extensions available for VS Code or Sublime text. What I didn't find useful tho, is the inheritance. I am not saying that it's a bad feature, but I am used to putting the CSS properties I will be reusing in a lot of classes in a class of their own and then I simply add them to the elements. This is a way of writing CSS I got used to since it gives me much more control later when working with Javascript.

Sass gives a new way of writing CSS, a more simple and exciting way. It's very useful and I think that it should be recommended to everyone, no matter the level of their web development skills.
TIL: The CSS attribute selector has a case-insensitive mode
Tags: webdev, css
Published: 2018-09-10 19:23:41

---
title: TIL: The CSS attribute selector has a case-insensitive mode
published: true
tags: webdev, css
canonical_url: https://www.stefanjudis.com/today-i-learned/the-css-attribute-selector-has-a-case-insensitive-mode/
---

I'm following the caniuse.com project on GitHub which means I get notifications about additions to the web platform and updated browser support. Today, I stumbled upon an issue including [new CSS Level 4 selectors](https://github.com/Fyrd/caniuse/issues/1058) that are or will be included on [caniuse.com](https://caniuse.com/).

It turns out there are a lot of [new selectors on their way](https://www.w3.org/TR/selectors-4/), and one interesting one is a flag which makes attribute selectors case-insensitive.

```css
/**
 * matches:
 * <div class="foo">...</div>
 * <div class="Foo">...</div>
 * <div class="fOo">...</div>
 * ...
 */
[class=foo i] {
  color: red;
}
```

Only downside is, that [Edge is not supporting this selector yet](https://caniuse.com/#feat=css-case-insensitive).

If you want to play around with this, I created [a quick codepen](https://codepen.io/stefanjudis/pen/XPzQXz). The only case I can think of this for this is when you have to deal with user-generated content, and the possibility is quite high the users enter not accurate data. Would love to learn more about other use cases for this – if you have an idea, please let me know.

*Edited: [Dominik pointed out](https://twitter.com/DKundel/status/1039102339041378304) that this could be indeed useful for user-generated content in input fields using the `value` attribute.*

```css
/**
 * matches:
 * <input value="hello world">
 * <input value="hello World">
 * <input value="hElLo WoRlD">
 * ...
 */
[value="hello world" i] { /* ... */ }
```
Time tracking for developers
Tags: productivity
Published: 2018-09-07 13:17:34

---
title: Time tracking for developers
published: true
description: The most hassle-free to track time you spend on projects and development.
tags: productivity
---

On one hand, time tracking is a hassle. But on the other, it gives you hard data that can help you identify time sinks. Plus, when you're working for a client, you have to keep track of time.

## Automatic time tracker

The most hassle-free way to track time you spend on projects and development is to install [WakaTime](https://wakatime.com), an automatic time tracker inside your text editor/IDE of choice.

Then, as you work and code, the tracker works in the background and calculates how much time you've spent on each repo/project.

You can access your time report in WakaTime dashboard and see your productivity broken down by day, project, programming language, and many other criteria.

![WakaTime dashboard](https://thepracticaldev.s3.amazonaws.com/i/lcxouw7oe8mf06rjapfq.png)


## Project time tracker

The best thing about WakaTime is that you don't have to lift a finger. But what if other people need your time logs? For example, your manager, payroll, or client?

In that case, you can use [Clockify](https://clockify.me). It's a project time tracker that's more user-friendly and supports time tracking in a team. The only downside is that you have to start/stop the timer or enter hours manually.

So, the best solution is to:

1. Install WakaTime
2. Work/code
3. At the end of the day, check how much time you've spent on projects/files/repos, and manually enter hours in Clockify so the data is available to others

![Time tracking in Clockify](https://thepracticaldev.s3.amazonaws.com/i/q5omftrx791rj5p7q8l5.png)

This way, you don't have to remembers what you've worked on at the end of the day or bother with starting/stopping timers.

## Using an issue tracker?

If you're working in issue trackers like JIRA, YouTrack, Gitlab/Github, or even Trello, you can install the [Clockify Chrome extension](https://clockify.me/chrome-time-tracking) and start timers for issues right from inside JIRA or whatever else you're using

![JIRA time tracking integration](https://clockify.me/assets/images/integrations/jira-time-tracking-integration.png)