teleren/devto huggingface dataset:
The Super Fun Text-Truncation-from-the-Left Adventures of Scooter and Boots
Tags: todayilearned, css, llamas
Published: 2019-10-11 13:02:19

---
title: The Super Fun Text-Truncation-from-the-Left Adventures of Scooter and Boots
published: true
description: An unexpected solution for truncating text from the left
tags: todayilearned,css,llamas
---

Lately, my colleague (Scooter) and I (Boots) ran into a puzzling UI problem.

Scooter and I work on the frontend of an application that displays lots of file paths.

Our app also does other things, but for now, let's say we work on a world-renowned file-path-displaying application. Our work is _riveting_.

Because file paths can end up growing quite long, Scooter and I regularly have to trim them. Like beautiful, delicate hedges. Or toenails.

For this, we've been using `text-overflow: ellipsis` ([mdn docs here](https://developer.mozilla.org/en-US/docs/Web/CSS/text-overflow)).

It works alright, but one drawback to this approach is that _it trims the end of the text_. See below:

￼￼￼![Image with text overflow trimmed from the right](https://thepracticaldev.s3.amazonaws.com/i/hclzpakjgqy35egh9hcx.png)
￼￼
We didn't like this, since Scootsy and I wanted our users to be able to see the filename. And, as we've learned from our dedicated work on this app, **the filename comes at the end of a path**.

It baffled ol' Scoots and me that there wasn't a native way to detect when text was trimmed in the browser. And that there wasn't a way to trim it from the left side instead of the right! 

_Gah!_ CSS! So useless, am I right?!

Well, here's where it's worth noting: Like bad, bad devs, we did not read the MDN page on `text-overflow` in its entirety. 

([Here's the link again](https://developer.mozilla.org/en-US/docs/Web/CSS/text-overflow).)

We just kinda skimmed that page. Then we proceeded to waste a silly amount of time on unnecessary javascripty solutions to our issues. Which, I guess, is the overarching theme of the last decade of web development sooooo, who's to blame us really?

I'll spare you the overcomplicated (_but functional!!!_) React Hook we wrote to solve our text-truncation issues. Instead, let's just bask in the simplicity of the CSS-only solution together:

￼```css
direction: rtl;
```

One extra line of css. That's it. 

When combined with `text-overflow: ellipsis`, setting the text direction to be right-to-left gives you text truncation from the left. Shout-out to Arabic and Hebrew!

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/9ia7kqre7m513e5i8so4.png)

I have no idea if there are downsides to this. Like does it mess with screen-readers? No idea. I literally just thought about that while writing the last sentence... :thinking:

Okay I should probably go check on that.

Thanks for reading! :heart:
A brief overview of Scala
Tags: scala, jvm
Published: 2019-10-11 07:14:48

Scala is a programming language invented in the year 2003 by Mr. Martin Odersky and his team. Scala released publicly in 2004 on the Java platform. The name Scala is a blend of scalable and languages. That signifies it designed to grow with the demands of its users.

- Scala is a Robust and High-Caliber programming language.
- It is also capable to outrun the speed of the fastest existing programming languages.
- it’s a compiler-based and a multi-paradigm language.
Which makes it compact, fast and efficient.
- Scala uses Java Virtual Machine(JVM) for compilation.
- Firstly Scala Compiler compiles the Scala code and generates the byte code for the same.
- After that, it transferred to the Java Virtual Machine to generate the Output.

key features of scala-
- In Scala, there are no static variables or methods. Scala uses a singleton 
 object, which is essentially class with only one object in the source file.
- Here you don,t require to mention data type and function return type explicitly. 
 Scala is enough smart to deduce the type of data.
- In Scala evaluation is lazy by default. Scala evaluates expressions only when 
 they are required.
- Scala provides a standard library that includes the actor model. So you can 
 write concurrency control.
 Higher-order functions are the function that either takes a function as an 
 argument or returns a function.

to know about what is scala used for- https://codersera.com/blog/what-is-scala-used-for-a-brief-overview/
Is Blockchain really changing the world at all?
Tags: watercooler, blockchain, discuss, healthydebate
Published: 2019-10-11 12:51:23

**Blockchain** is one of the heaviest buzzwords in tech, but is it really that mind-blowing innovative? I see the points of distribution, democracy & transparency and I also think I've got a good grasp on it. However, I hardly found anything like the "one killer app" out there that uses Blockchain except some cryptocurrency projects that are more or less a copy of Bitcoin.

Do you know any cool, innovative projects? Can you imagine something running on Blockchain that may change the world as we know it? Looking forward to hear your opinions!
How to run JMeter test from Jenkins?
Tags: jmeter, jenkins, cicd, loadtest
Published: 2019-10-11 12:47:41

Step 1 : Install Jenkins
https://jenkins.io/doc/book/installing/

Step 2 : Install Performance Plugin in Jenkins from Manage Jenkins Options.

Step 3 : Goto Jmeter/bin folder open user.properties file and add line :
   jmeter.save.saveservice.output_format=xml

Step 4 : Create a Jmeter test

Step 5 : Add a job in Jenkins - add below jmeter commands in build step
>cd C:\Automation\Softwares\apache-jmeter-5.1.1\apache-jmeter-5.1.1\bin
>jmeter -n -t “location of the jmeter script” -l “location of result file”
-e -o “location of the output folder”

example:
>jmeter -n -t F:\DevelopmentPrograms\LoadTest\FTP_LoadTest.jmx -l 
F:\DevelopmentPrograms\LoadTest\Results\result.csv -e -o F:\DevelopmentPrograms\LoadTest\Results

Step 6 : Add post build action - publish performance test reports

Step 7 : Run and validate

That's it.
4 Reasons why being humble will help you become a better developer
Tags: career, opinion, learning, advice
Published: 2019-10-11 12:08:44

---
title: 4 Reasons why being humble will help you become a better developer
published: true
description: 4 reasons why I believe being humble will help you become a better developer
tags: career, opinion, learning, advice
canonical_url: https://maurogarcia.dev/maurogarcia.dev/posts/4-reasons-why-being-humble-will-help-you-become-a-better-developer-/
---

A few days ago, Ben published an article about the five pillars of a successful career in software:


{% link https://dev.to/ben/the-five-pillars-of-a-successful-career-in-software-4i8o %}

After reading it, I thought something was missing. So I wrote the following comment:

{% devcomment g935 %} 

Since my comment had such a great reception, I decided to share some reasons why I think being humble will help you succeed as a developer

#1 - Curiosity to learn new things

As I mentioned above, you'll have a really hard time trying to learn a new language or technique if you are sure your way is better and will always be. 
Humble devs know they don't have all the answers and that leads them to seek for new insights.

#2 - Natural collaborators

You've been working hard to fix a bug and you finally found a solution. After submitting a PR, the code reviewer quickly rejects your PR leaving the following comment: 

**"Your approach sucks :poop:. Please do it better the next time"**

Humble people usually have low sense of entitlement. This leads them to be less judgmental and more grateful with their peers, which ultimately enables better teamwork and better relationships in general (which is vital if code review is part of your daily job)

There's nothing wrong about rejecting a bad PR, But I think we should always be emphatic with the code's author and try to be as clear as possible about the reasons why that code is being rejected. 

#3 - Continuous self improvement
Curiosity leads humble devs, ultimately, to find better ways to solve a problem and be more productive. Here is when good practices like clean code naturally appears:

{% link https://dev.to/paulasantamaria/clean-code-why-bother-21lo %}

#4 - Better leadership

You cannot be a good leader if you don't recognise your own mistakes. Humble devs allow themselves to be wrong, and will take the required time to re-check what they think is true, or better, and will always be willing to acknowledge their mistake.

---

##What other things do you think are essential to be a good developer?

Let me know in the comments 👇
An Improved Software Development Workflow
Tags: productivity, startup, architecture
Published: 2019-10-11 05:30:12

---
title: An Improved Software Development Workflow
published: true
description: A Pragmatic software development process
tags: #discuss #productivity #startup #architecture
---
1.	Increase throughput 
2.	Reduce single points of failure
3.	Maximize individual productivity
4.	Allow room for developers of all levels

Principals outlined below are aimed at increasing productivity within a small software development team – 10 to 15 developers. Although applicable in large environments, they result from a direct observation within a small setting. Why another workflow? Frankly agile is a bit cumbersome to get right. Meanwhile waterfall is not suitable in today’s market – especially in a startup environment.

####PRINCIPAL 1 – ABSTRACT OUT PROJECT INFORMATION FROM TASKS####
Do not have developers tied to a project. Project details belong at the business and architectural level. It is the role of the architect to devise how each project is to be realized within the infrastructure. With the help of senior developers and business analysts, projects should be divided into sets of tasks that can be completed independently. Thus, developers should mainly focus on completing these tasks – irrespective of the project they are associated with. This increases velocity and reduces single points of failure. Not to mention, new team members are productive on day one – regardless of their level. While talking about "task", no single task shall exceed a day’s worth of work. It makes code management a nightmare the long these get. While a single developer solely delivering a huge project may seem productive, it’s a liability to the team in the long run.

####PRINCIPAL 2 – ARCHITECTURE OVER DETAILS####
Do not define tasks before architecture. Contrary to common misunderstanding, software architecture is a dynamic structure - far from static. A considerable effort is needed as new functionalities or constraints are added to the system. Your architecture should never learn about new functionality from ongoing tasks. Architecture is about boundaries and flow. These should remain flexible over the course of your software and dictate the shape of your tasks.  

####PRINCIPAL 3 – MEASURE####
Your Software solution lives and dies by the accuracy of your estimation – or lack of. If you can’t tell how it takes your team to complete a set of requirements within a reasonable range, it won’t take long before your competitor takes over. The ability to measure progress is very crucial. The challenge is always maintaining a high throughput without burnout. Meanwhile, most teams couldn’t tell you their velocity. Charge your team with a sizeable bucket of tasks and let them organize themselves to get the work done within your time constraint. This approach increases team morale and allows developers to work closely.
Block specific URL using match pattern with Chrome
Tags: testing, beginners, webdev
Published: 2019-10-11 11:05:47

Today we are going to learn about blocking some URL with Chrome. There are many use cases to block a specific URL, one of them is that you need to test your application behavior when your images are not accessible anymore for any reason. Chrome has provided a built-in feature to do this, let's discover it.

#The steps
1 - To access the DevTools, open a web page in Google Chrome and Right-click on any page and select **Inspect**.
2 - Click on **three-dots icon** ( at the top right of the DevTools).
3 - Navigate to **more tools** option.
4 - Click on the **Request blocking** option.
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/chbqaaq2nowahkky6efl.png)
5- A new section is opened like the below image:
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/uqozdaw896iubf0gieeu.PNG)
Click on **Add pattern**. This will show up a text field.
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/muugmi7gsrzy8q1oedpw.PNG)
In the text field, you can write down any specific URL to block for example, `https://www.websiteToBlock.com`. Or you can use a pattern such as `https://*.websiteToBlock.com/foo*`, this will block any subdomain of `websiteToBlock` as long as the path starts with `/foo` and uses `https` schema. For more details about Match patterns, you can follow these references from  [Google Chrome](https://developer.chrome.com/apps/match_patterns) and [Mozilla](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Match_patterns).

Have a nice testing day.
Debugging philosophy; goals of testing; & mistakes junior devs make
Tags: todayilearned, beginners, codenewbie, testing
Published: 2019-10-11 10:55:15

*TL;DR versions of articles I read today on software engineering. [Sign up for my newsletter](https://mailchi.mp/appsmith/insnippets?utm_source=devto&utm_medium=post1&utm_campaign=is) to receive these in your inbox every weekday.*



### [The fundamental philosophy of debugging](http://bit.ly/debug-philosophy)

- Get thoroughly familiar with what a working system does.
- Realize that you don’t already know the answer. Don’t try to guess the causes. 
- Look at data until you understand what is causing the problem. 
- Compare the data that you have with what you know the data from a working system should look like.
- Fix the cause of this anomaly, not the symptoms.

*[Full post here](http://bit.ly/debug-philosophy), 8 mins read*

---

### [Your test should verify if the code solves the problem, not if it runs](http://bit.ly/why-testing)

A few salient points from the post: 
- Your code is fragile if
   - structure of the code allows you to make a breaking change without a test failure
   - you have a high degree of coupling between code and their test files

- Write code such that if you separate the structure of the code according to the structure of the problem, you won't have to change the structure of the code unless the structure of the problem changes completely.

- The tests should stay passing in a refactoring operation. Otherwise, that's not refactoring. If you make changes in the code that doesn’t change behavior, you should not make the tests fail.

*[Full post here](http://bit.ly/why-testing), 10 mins read*

---

### [Mistakes I’ve made as a junior developer — and how you can avoid them](http://bit.ly/dev-mistakes)

Jack Finlay’s reflections on his first two years as a software developer.

- **Don’t jump at the first offer.** Research on what you are worth, what the company culture is like and what kind of projects will you be working on. 
- **Code is never self-documenting** however clean it is. Use comments extensively. 
- **Don’t wait before asking questions.** If you don’t ask, you run the risk of wrong assumptions and of building something wrong. 
- **Don’t get stuck only using proprietary tooling and languages.** Code in your time outside of work to ensure you have skills that are transferable to other companies. 
- **Take care of yourself.** Read, write, exercise and take some time off. 

*[Full post here](http://bit.ly/dev-mistakes), 8 mins read*

---
Millions of Phones Leaking Information Via Tor
Tags: mobile, ios, android, discuss
Published: 2019-10-11 10:46:53

---
title: "Millions of Phones Leaking Information Via Tor"
cover_image: "https://thepracticaldev.s3.amazonaws.com/i/0lcgokp5go0a54hpsz1u.png"
published: true
description: "Researchers claim 30% of all Android devices, and 5% of iOS devices, are transmitting data that could be used to track and profile users"
tags: "mobile,ios,android,discuss"
---

In [this article](https://www.infosecurity-magazine.com/news/millions-phones-leaking-information/) we can read that researchers Adam Podgorski and Milind Bhargava, from Deloitte Canada, have setup several [TOR](https://www.torproject.org/) exit nodes just to see what they could find, and they claim that 30% of all Android devices, and 5% of iOS devices, are transmitting data that could be used to build a strong profile of an individual.


## TLDR

#### The data being collected

> In a series of demonstrations, including live dashboards shown by Bhargava, the researchers showed what data they had collected from mobile users that were inadvertently using Tor. The data included GPS coordinates, web addresses, phone numbers, keystrokes and other PII.

#### How did the researchers collected the data

> Bhargava explained that the exit nodes the researchers set up intentionally attempted to force browsers to not use encrypted versions of websites, forcing the devices to regular HTTP when possible. With data coming to the exit node without encryption, it was possible for the researchers to see the user data. Bhargava noted that for sites that force HTTPS encryption and do not offer any fallback option to regular un-encrypted HTTP, they wouldn’t be able to see the users data.

#### Are you sure that TOR is not installed in your device?

> Also of note, Bhargava admitted that he found his own phone number in the data, which was a surprise to him, as he had not installed Tor on his device. The only applications on his phone were applications installed by the carrier.


## Lets's Discuss


This bit of the article is what worries me the most:

> What the researchers determined is that Tor is being bundled, embedded and installed in other applications and users are not aware of its existence. It was not entirely clear to the researchers why Tor was being bundled with so many applications. Podgorski said that it could be due to a misunderstanding of the technology and how it can be used.


In your opinion is TOR being bundled and used in the mobiles devices to track us secretly, or do you think that the developers just misunderstood the TOR technology and how it should be used? 

Please leave your opinion in the comments.
Repositories for Hacktoberfest2019
Tags: hacktoberfest2019
Published: 2019-10-11 09:59:12

---
title: Repositories for Hacktoberfest2019 
published: true
description:  
tags: hacktoberfest2019
---


Hi,
in order to help people to find, quickly, some issues for the hacktoberfest I thought to create a post where all of you can post your projects. 
The format should be something like:

LEVEL 
Link to the repo - [languages, mini description, tags]

In example today I've add some issues on my old respository


Beginner

[github_text_search](https://github.com/Cereal84/github_text_search_chrome_ext) - [javascript, chrome extension].

I hope this initiative can help some of you.
JMeter- Read data from CSV file (Parameterisation)
Tags: jmeter, testing, csv, parameterisation
Published: 2019-10-11 10:29:05

This article is extension of my previous article "REST API testing in JMeter: https://dev.to/raghwendrasonu/rest-api-testing-in-jmeter-iid

In this article we are going to parameterise both the variables. So "q" and "appid" we are going to read from external CSV File.

Step 1: Create a CSV file with all the parameters.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/3a21swnsmws75ids7dpb.png)

Step 2 : Add config element as CSV Data Set Config in the JMeter Test Plan
Add -> config element -> CSV Data Set Config
Add csv file path.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/o8ymsuyzwew0jf0xq022.png)

Step 3 : Update value fields in JMeter with ${variable_name}.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/a6aaemqpanhoaib7uauh.png)

Step 4 : Run and validate the results.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/ajxur17ilqz34vzus0d5.png)
บันทึกการ setting intellij project ให้รองรับ Lombok
Tags: java, ide, intellij
Published: 2019-10-11 10:22:58

---
title: บันทึกการ setting intellij project ให้รองรับ Lombok
published: true
description: 
tags: java, ide, intellij
---

ไม่ได้เขียน Java มานาน ได้เรื่องกลับไปเขียนใหม่
ปัญหาของเราคือ จำไม่ได้ว่า project มัน setting ยังงัย

สำหรับ spring นั้นง่ายนิดเดียว ไปสร้างที่ [start.spring.io](https://start.spring.io)
ซึ่งสามารถเลือก library มาทำงานได้เลย โดยส่วนใหญ่เราจะใช้ Lombok
เป็นตัว annotation ที่ช่วย generate code บางอยา่งที่เขียนซ้ำๆเดิมๆ 

เช่น `@Log4j` เมื่อใส่ annotation นี้เราจะสามารถใช้ `log.info()` 
โดยที่ไม่ต้อง new Logger ประหยัดเวลา และลดความน่าเบื่อไปได้เยอะ

แต่สำหรับ Lombok มันมีปัญหาที่ intellij จะแสดง error ออกมา
ทั้งๆที่สามารถ build ได้ เพราะว่า intellij มันหา generated code ไม่เจอนั่นเอง

การแก้ไขคือ
1. enable annotation processor 
   โดยไปที่ preference ค้นหาด้วย annotation แล้วเดี๋ยวเจอให้ enable เลย
2. ลง plugin Lombok
   โดยไปที่ preference ค้นหาด้วย plugin แล้วค้นหา Lombok อีกที กด install แล้ว restart IDE

จบ!
JMeter- create HTML Dashboard Reports from command line
Tags: jmeter, dashboard
Published: 2019-10-11 09:37:53

To create report at the end of the test, execute command from command prompt:
  —————————————————————
  jmeter -n -t “location of the jmeter script” -l “location of result file”
  -e -o “location of the output folder”
example:
>jmeter -n -t F:\DevelopmentPrograms\LoadTest\FTP_LoadTest.jmx -l F:\DevelopmentPrograms\LoadTest\Results\result.csv -e -o F:\DevelopmentPrograms\LoadTest\Results

  create report from a standalone csv file
  ——————————————————————
  jmeter -g “location of csv file” -o “location of output folder”
 
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/0u9r6de9yglij5f4mr47.png)

For more details refer here: https://jmeter.apache.org/usermanual/get-started.html
Microsoft Technologies For Web Development
Tags: hireaspnetdeveloper, hiremvcdeveloper, offshorenetdevelopers, offshoreaspnetdevelopment
Published: 2019-10-11 09:29:17

Today in the time, every business needs to develop a modern and unique website/apps to increase more customers and for that, they need to hire a company that meets with their business prerequisite. First Web Development work on many Microsoft technologies includes ASP.NET, MVC, .NET etc for creating modern web apps. Our expert's team have good knowledge of Microsoft technologies and always provide the most effective and professional service to our clients and leave them happy.
More to Know - http://www.firstwebdevelopment.com/microsoft-technologies
Tired of updating namespaces? With VS2019 you won't.
Tags: visualstudio2019
Published: 2019-10-11 09:26:47

---
title: Tired of updating namespaces? With VS2019 you won't.
published: true
description: New feature in VS 2019 which adjusts the class namespaces based on the folder the file in the present
tags: Visual studio 2019
series: New in Visual Studio 2019
---

Most of us programmers would have moved code files around to different folders at a different stages of the application development, this might be due to refactoring or redesigning or re-organizing. While moving around the code files, most .Net developers would have spent enough time changing the namespaces to match the folder structure (as better practice).

With Visual Studio 2019, this mundane task of changing the namespaces while moving folder is now automated, which means, visual studio updates the namespace to match the folder structure by itself. 
Even if for some reason, you move the folder using the file explorer rather than the visual studio, in such case, you can go into the code file and you get an option to update the namespace to match the folder structure or change it any other existing namespace from your project.

![Namespace change option](https://thepracticaldev.s3.amazonaws.com/i/82q32fxgct4ywxayk8pt.png)


Cool isn't it.