teleren/devto huggingface dataset:
Minimalism and Habits
Tags: productivity, minimalism, habits
Published: 2019-05-26 03:41:48

---
title: Minimalism and Habits
published: true
description: Good habits not only keep us on track, but they save us time and energy.
tags: productivity, minimalism, habits
cover_image: https://thepracticaldev.s3.amazonaws.com/i/hovctbcvi5xfu1hw4cjj.jpg
---

[Charles Duhigg](https://twitter.com/cduhigg)'s [*The Power of Habit*](https://www.amazon.com/Power-Habit-What-Life-Business/dp/B007EJSMC8/ref=tmm_aud_swatch_0?_encoding=UTF8&qid=&sr=) is an awesome book that gets into the science of decision-making and forming habits. My favorite takeaway from the book is that habits are things we end up doing automatically, meaning we don't even have to use as much energy to think about doing them.

If you're like me, you think waaay too much.

![A little kid leaning on a table and thinking](https://media.giphy.com/media/JSgDJLtBZnx9m/giphy.gif)

Thinking isn't inherently a bad thing. People tend to associate overthinking with being emotional, and that's fine. There's nothing wrong with being an emotional person. Accept it; run with it. :)

But there a lot of things we tend to overthink that can be easily simplified. For example, some people wear the same jeans and shirts every day so they don't have to think about what to wear. Some eat the same breakfast, drive the same commute, or walk their dogs on the same path. I get bored with super rigid routines, so it takes practice finding what works.

Where does minimalism come into creating habits? Well, think of the first example: wearing the same outfit every day. That requires minimizing your closet and getting rid of all your clothing that doesn't align with that outfit. I like to see minimalism as a tool in addition to a lifestyle. Usually, it helps me set myself up for even bigger forward steps.

Think of it as clearing mental space for doing what's most important. If you need some help getting started, I recommend cleaning out your email subscriptions. I've been needing to do this for weeks and I'll probably avoid checking my inbox as often as I should until it's done. 🙈

{% link https://dev.to/ashleemboyer/throw-all-of-your-email-subscriptions-in-the-garbage-25ah %}

What habits are you working on or wanting to get started? Where could spend time minimizing things to make room for the habits you want to create?

---

Did you know I have a newsletter? 📬

If you want to get notified when I publish new blog posts or make major project announcements, head over to [https://ashleemboyer.com/newsletter](https://ashleemboyer.com/newsletter).

---

*[Image](https://unsplash.com/photos/ZOWgBZHi6Bg) by [mohssine chnaf](https://unsplash.com/@mohssinechnaf) on [Unsplash](https://unsplash.com).*
Hi, I'm Cody Ogden
Tags: introductions
Published: 2019-05-26 03:37:57

---
title: Hi, I'm Cody Ogden
published: true
description: My introduction post
cover_image: 
tags: introductions
---

Hi! I'm Cody Ogden. I make things for the web.

Here are some things I've made (so far):
- [Killed by Google](https://killedbygoogle.com)
- [Press.css](https://press-css.io)

I've been crafting software since I was ten years old, and my passion for building great experiences and solving problems with technology continues to grow today. It all started with a JavaScript program to help me cheat on math homework--fifth grade math is tough! I have spent over fifteen years learning and using tech in many forms. I now look forward to using and building my skills each day while making an impact at the intersection of technology and life.

You can find as `@codyogden` on most of the "things."
React Native Custom Animated Sliding Drawer Example
Tags: reactnative, android, ios, javascript
Published: 2019-05-26 03:10:31

---
title: React Native Custom Animated Sliding Drawer Example
published: true
description: React Native Custom Animated Sliding Drawer Example
tags: #reactnative #android #ios #js
---

Source : <a href="https://www.skptricks.com/2019/05/react-native-custom-animated-sliding-drawer.html" > React Native Custom Animated Sliding Drawer Example</a>

This tutorial explains how to create custom animated sliding drawer in react native application. Here we will provide complete explanation and code, that helps you create own custom drawer in android or ios application.

<a href="https://www.skptricks.com/2019/05/react-native-custom-animated-sliding-drawer.html" > React Native Custom Animated Sliding Drawer Example</a>
<img src="https://1.bp.blogspot.com/-f1fR-HCdphY/XOoA3tm7yCI/AAAAAAAAC1Y/KpJ55GoP9toGCUca0EeMDrE19JbCZsW6wCLcBGAs/s400/react-native-custom-animated-sliding-drawer.jpg" />

<a href="https://www.skptricks.com/2019/05/react-native-custom-animated-sliding-drawer.html" > Click here to read more...</a>
dilemma in the life of a programmer :(
Tags: discuss
Published: 2019-05-26 02:18:43

I have been working for more than 10 years in a private company, in this time I worked with several languages ​​(Fortran, Visual Basic 4, Visual Basic 6, Java, C #, etc ...).  During this time I always felt that something was missing from me ... This year I decided to contribute to an Open Source project ... but I do not know which one to choose, I read and I can not choose one ... why is it so difficult?  I want to feel useful ... but I do not know which project to choose ..: '(
Deployment of EJB server application and client independently
Tags: ejb, jsf, javaee
Published: 2019-05-26 00:18:02

---
title: Deployment of EJB server application and client independently
published: true
description: 
tags: #ejb #jsf #JavaEE
---
A friend asked me to work on an EJB and EJB client project in an independent separated deployment package for each.

I get used to use Netbeans to do that along time ago, but I decided to do it with maven. Looking for that I found that Apache provided plugins of EAR and EJB application for maven:
https://maven.apache.org/plugins/maven-ear-plugin/ for deploying artifacts as a Java EE Enterprise Archive (EAR)
https://maven.apache.org/plugins/maven-ejb-plugin/ which generates Java Enterprise JavaBean (EJB) file as well as the associated client jar.
That was almost perfect though the documentation was not clear enough. then I looked for someone how used it and fortunately I found an example on github, it was good to some extent, but wasn’t organized well and I had build issues with maven.

Making some efforts to re-organize the pom structure and fix some configurations I was able to build the EJB application as an isolated EAR file (because of dependencies on Hibernate it should be EAR not JAR).
the plugin also generates EJB jar and EJB client jar for you and with maven you can add it easily as a dependency for your client application.

The build of the EJB client application was straightforward with JSF, primefaces and the created EJB client jar built in the first step. then I used Glassfish server to deploy both artifacts.

This was just a simple try to build isolated Enterprise Java applications but things may go complex with other requirements.

You can check github for sources and build/deploy instructions
https://github.com/mhddurrah/ejb-application
https://github.com/mhddurrah/ejb-jsf-client
and don’t hesitate to contact me for updates or other issues/ queries.
Am I (not) a mid-level dev yet?
Tags: discuss, career, midlevel
Published: 2019-05-26 01:36:34

---
title: Am I (not) a mid-level dev yet?
published: true
description: Are there specific experiences you expect someone to have had before they can claim to be a mid-level developer?
tags: #discuss #career #midlevel
cover_image: https://thepracticaldev.s3.amazonaws.com/i/vjjtu0fo42wfmpbzjs0x.jpg
---

What is a mid-level developer to you?

Photo credit Pexels.com, attribution isn't required but they are rad.

Story time. I had a recruiter reach out to me yesterday for the first time in ~9 months. After some conversation *(possibly including self-assessment and salary topics)* he admitted he had been passing over my name for mid-level positions, thinking I still considered myself to be junior. He suggested that I have another "tech assessment" phone call, implying "how much could have *really* changed?" when I feel he didn't really know me when we talked the first time around. *(Not counting the degree I've been doing this ~4 years now.)*

This got me wondering, how would a recruiter define the difference vs. how would a developer define the difference? *without diving into unhealthy comparisons,*

- Where do you draw your arbitrary line in the sand?
- Are there specific experiences you expect someone to have had before they can claim to be a mid-level developer?
- Are there specific languages/frameworks they must know or certain concepts they should be able to explain off-hand?

UPDATE: I did have that tech assessment, and I felt really good about it! As my final question I asked what a mid-level dev was to the interviewer, and the things he mentioned were all things I do day-to-day. Some examples he gave:
- Works with little to no supervision
- Is always learning and improving
- Does the work and documents as they go
- Knows *when* to reach out for help
- Helps more junior team members
Inheritance without extends
Tags: java, inheritance, patterns, visitor
Published: 2019-05-26 00:47:23

---
title: Inheritance without extends
published: true
description: 
tags: #java #inheritance #patterns #visitor
---

Yes, inheritance means adding or changing the behavior of a class by a sub class
the traditional way of doing inheritance is by extending a class adding new methods.
Let us take an example from Java world
![Image](https://cdn-images-1.medium.com/max/1200/1*sFl0Kykd8n02FslraHJv3g.png)
<figcaption>Super class</figcaption>

extending this class to add a new behavior can be done directly and easily:
![Image](https://cdn-images-1.medium.com/max/1200/1*81HaiR4eC5_U4K3tFcoOZA.png)
<figcaption>Inherited</figcaption>

nice !

But here the inheritance is static, I need to create a new class for every new functionality.
Another way of adding functionality come from Design Patterns world, it is
the Visitor Pattern which basically “represents an operation to be performed on the elements of an object structure.” but also can be utilized to define a new operation without changing the class.
One mandatory pre-requirement for this pattern is to implement it :), the implementation is adding a behavior to the class to accept the Visitor.
![Image](https://cdn-images-1.medium.com/max/1200/1*8B4Sy1AnNvJJHv-KgsFL9Q.png)
<figcaption>Visitor</figcaption>

Visitor is an interface with single (or multiple) method(s)
![Image](https://cdn-images-1.medium.com/max/1200/1*p7ycUll3HK7ZdMuafKhOrg.png)
<figcaption>Visitor Interface</figcaption>

Let us implement the Sub class simulator ->
![Image](https://cdn-images-1.medium.com/max/1200/1*4tRDgRxK5Xqfosv8LC6V0A.png)
<figcaption>Visitor Implementation</figcaption>

But we had to add a new class for the new functionality! , Yes, but the good thing is that we can add the functionality dynamically to single objects of the class (the same idea applied in Decorator Pattern)
![Image](https://cdn-images-1.medium.com/max/1200/1*Pjbl40UjoCDZIB1Kd0uuKg.png)
<figcaption>Visitor Tester</figcaption>

adding another Visitor with lambda expressions
![Image](https://cdn-images-1.medium.com/max/1200/1*YXXBIOMLNhj4bTpiGs4SJg.png)
<figcaption>Using Lambda</figcaption>


A full snippet
![Image](https://cdn-images-1.medium.com/max/1200/1*LdbVMkTdNmVOBBYp6Exuew.png)

This will not give a full control and capabilities of traditional inheritance but it helps :)

As a final note: try to support visitor pattern whenever possible in your classes :)

all comments are welcomed.
I explain how the browser renders an interactive webpage like you were five
Tags: javascript, browser, css, html
Published: 2019-05-26 00:44:11

I have being using Html, Css and JavaScript for quite a while now and didnt know until recent 😭, I mean, I knew about the DOM just not in-depth. I DELIBERATELY had to read up on this. So here is LIKE a summary 🙂. 
When the browser gets your html SOURCE file, it wouldn't tamper with that but, creates KIND OF LIKE a copy of the document, which is known as the DOM(Document Object Model), which is an object representation of all the elements in the html SOURCE file. It is KIND OF LIKE a copy because the DOM is not entirely like the SOURCE file, meaning if in your html file you put the visible contents outside the body tags but not inside the head tags though, the DOM would be a CORRECTED version of that. Same is done for the cascading style sheet, it creates a Cascading Style Sheet Object Model (CSSOM), which is a representation of all the elements and styles associated with them. Now the browser can tamper with the DOM and CSSOM using your Javascript code or some other program. Hope you understand to this point?🙃🙃.
So the browser is creating a perfect copy of the html file called DOM and then meets a script tag, it pauses on the creation and runs the Javascript and then resumes creation. Creation of a DOM is when the browser is PARSING the html document (like reading the file to determine the content and structure). Using the DOM and the CSSOM the browser creates the RENDER TREE, the visible contents of what would be rendered on the viewport, meaning elements on the DOM with display style property of "none" won't show up. 🙃 The End.
Important points i missed, that you think a 5 years old programmer should know 🤔😏🙂??.
30 Days of AWS (Day 1)
Tags: aws, challenge, 30daysofaws
Published: 2019-05-26 00:07:50

---
title: 30 Days of AWS (Day 1)
published: true
description: 
tags: AWS, challenge, 30DaysOfAWS
cover_image: https://thepracticaldev.s3.amazonaws.com/i/xk3wcpnc2h8nk8oy9xh6.png
series: 30 Days of AWS
---

Hello everybody that is following this crazy adventure, I really appreciate it.

Today I was exploring What's IAM in AWS. Although I already knew about it was pretty awesome to study again. I watched all the section about this topic in the course that I'm doing on Linux Academy, besides reading the official docs.

### Topics Covered today in my hour and a half studying

1. What's IAM service (From the official docs):  AWS Identity and Access Management (IAM) is a web service that helps you securely control access to AWS resources. You use IAM to control who is authenticated (signed in) and authorized (has permissions) to use resources. If you wanna learn more about press [here](https://docs.aws.amazon.com/IAM/latest/UserGuide/introduction.html)

2. IAM Initial setup and configuration: this part I was already done when I created my AWS account. Basically here I was covering the 5 steps that should have complete to keep your account secured.![IAM Initial setup](https://thepracticaldev.s3.amazonaws.com/i/3vc2pa29ndvpi7mzdp5g.png)

3. Creating IAM users and policies: Here I was practising about how to create users and policies.

4. Creating IAM groups and policies: So here I was practising creating different groups and add policies to these groups.

5. Doing the Quiz: At the end of the topic they have a quiz that you can take buying it with gems, I spent 7 gems and I got 80% / 100% So I think that today was a productive day

![Today Exam](https://thepracticaldev.s3.amazonaws.com/i/msrvokodaohcss56sakw.png)

So, this is the end of this day, Tomorrow I will continue with this course AWS Essentials.

Thanks for reading.
Need help with python
Tags: help
Published: 2019-05-25 23:49:57

---
title: Need help with python
published: true
tags: help
---

how would you achieve the following logic using python?

- Take a search query, for example, why do I like dogs?
- Open browser, navigate to duckduckgo (or something else), search for my query.
- Save the HTML of the search page.
- Open each URL in search page (for the first page)in a new tab.
- Save the HTML of each opened URL
Are we giving GitHub too much control?
Tags: github, opensource, centralisation, question
Published: 2019-05-25 23:29:47

It's great that GitHub is announcing all these cool new features that developers need, but with open source development happening mostly on GitHub, should we be worried that we're giving GitHub too much control? *IF* (and that's a very big if) GitHub does go rogue, what could the worst case scenario look like? Assuming that people would just migrate to other sites (GitLab et al) that would still mean a lot of work would have to be done.

Now, I know that people can just set up GitLab locally, is there a Mastodon like solution but for open source development? What could the pros and cons of such a service be?
Js and burning out
Tags: help, javascript, webdev, discuss
Published: 2019-05-25 22:03:33

Im just burning out more and more as i understand that i understand nothing. Using with complex spa? 30% of code is type and value checks because js doesnt really care, type coercion and legacy parts of it, weird interactions.

I've tried typescript and its better, not by a lot but better, but many devs that i know or work with say that it is useless/they know what they are doing? Most of the time i dont develop i develop around javascripts kinks.

Js alternatives for web are not really big and have no really meaningful marketshare.

What should i do? Try another language/programming field ? Stick to typescript/flow/reason/elm/purescript for my pet projects and look for new opportunities? Im lost on what to do. Any help would be appreciated.

Experience 1.5 years.
The "Elitist Developer" Debacle
Tags: computerscience, dev, career, discuss
Published: 2019-05-25 21:56:12

---
title: The "Elitist Developer" Debacle
published: true
description: 
tags: #computerscience, #dev, #career, #discuss
---
I recently published a post on [imposter syndrome](https://dev.to/badrecordlength/the-fake-developer-conundrum-38oi), it has had a far greater response than I anticipated and its reception has prompted me to think further about the subject. I honestly had no idea that my feelings regarding self-doubt and anxiety of ability were so widespread in the developer community, I have found the replies incredibly reassuring and uplifting. There was a broad scope of replies by a number of devs, ranging from undergrads like me, to senior developers and even the founder of DEV. All in all a very positive experience drawn from quite a negative concern that I've been plagued with for some time.

Despite this however, I can't help but wonder if such an emotion appearing to be so prevalent amongst many clearly talented developers is perhaps indicative of problems in the developer community at large. Obviously impostor syndrome is a complex feeling and I'm not suggesting that elitism is the primary cause at all, just considering it as a factor in cultivating an [imaginary standard](https://dev.to/syntaxseed/comment/b3of) that a lot of devs hold themselves to. I wonder how many aspiring devs have been put off programming/development because of these fears. Also, it should be noted that I'm certainly not talking about DEV :smile:, I don't think I've seen single toxic comment in my time here, I think it's a wider issue.

During my *albeit short* 3 year(ish) tenure as programmer I have come across a fair bit of elitism and gatekeeping in various communities, both online and in the real world. We've all seen the overly snarky and arrogant Stack Overflow answer to an innocuous/reasonable question. We've all either been witness to or baited into engaging in the infinitely tedious "my language is better than your language" non-debate. We've all probably been sneered at for our hardware or software platform of choice at some point or another. I can see how to a newcomer getting into programming that the process could seem overly difficult and the online community overly abrasive.

I've definitely encountered this to a certain extent in education and the real world as well, though I doubt its something that would fly in a work environment. Which brings me to my next order of business, discussion! To those more experienced (or jaded :stuck_out_tongue_closed_eyes:) than myself, is this something that is mostly limited to an online space, or is it something that happens every so often in the professional realm? To those less experienced or of similar experience to myself, have you ever been put off from programming/developing for a time because of this? Bonus points for funniest/most nonsensical examples of elitism/gatekeeping over something really petty :laughing:.
Effective Debugging
Tags: beginners, debugging, processes
Published: 2019-05-25 21:27:48


### What is a bug?

A bug is an error or fault with a program that causes an unexpected or incorrect result. There can be many causes of bugs with some including issues with the code itself e.g typos, syntax errors and undefined variables or issues with unexpected behaviour which means that the code is running fun but the expected result is not being produced - unit tests are good at catching these types of errors e.g the below will show whether your program is producing unexpected results:

```
fizzbuzz
  prints Fizz if the number is 3 (FAILED - 1)

Failures:

  1) FizzBuzz prints Fizz if the number is 3
     Failure/Error: expect(fizzbuzz(3)).to eq 'Fizz'

       expected: "Fizz"
            got: 3

1 example, 1 failure
```

An important point to mention is that no matter your testing methodology, if you come across an error that does not have a test case already written, you should write a test case that reproduces the bug, this will help keep you focused on fixing that bug and highlight if that bug happens again.


### What does a good debugging process look like?
#### 1. Tighten the loop
The first step is to find where the error is originating from. 

```
  2) RandomHappyEmoji::new returns a :D emoji as a string
     Failure/Error: super(HAPPY_EMOJI.sample)
     
     NameError:
       uninitialized constant HAPPY_EMOJI
     # ./lib/random_happy_emoji.rb:10:in `initialize'
     # ./spec/units/random_happy_emoji_spec.rb:11:in `new'
     # ./spec/units/random_happy_emoji_spec.rb:11:in `block (3 levels) in <top (required)>'
```
By reading the stack trace in the error message you can find the file and line number. 
```
# ./lib/random_happy_emoji.rb:10:in `initialize'
``` 
The line above highlights file and line the error message is originating from. Error message contains a lot useful information to help point you in the right direction - although arguably some languages are more helpful than others.

#### 2. Get visibility on the error
The next step would be to read the code where the error is located and see whether you can you follow what is happening in your code. Are there any tools that will help you see what your code is outputting at each step?
Ruby has the p command which can be used to return a value on a specific line, variable or method call.
JavaScript has console.log() and the debugger in your chrome dev tools

#### 3. Make a change and run a test
Only make a change to the code when you have a clear idea of what is going on. Check if your test has made a change to the error message - if not you can undo that change.

One thing that I can't stress enough is making sure you read your error messages, on numerous occasions I have sat there scratching my head before noticing that the console is shouting something like 'unexpected token ; on line 5'. If you notice this happening it is probably time for a break.