teleren/devto huggingface dataset:
Optional to stream in java 9
Tags: java, java9, collections, optional
Published: 2019-07-24 08:17:42

---
title: Optional to stream in java 9
published: true
tags: JAVA, JAVA9, COLLECTIONS, OPTIONAL
canonical_url: https://jsblogs.github.io/java/2018/03/08/Optional-to-stream-in-java9
---

Last year Java 9 launched with tons of new features. In this blog post, I’m going to explain streams in `Optional` (introduced in Java8). Now you can get streams to form `Optional` which I think is a good feature.

Below example shows how to get a stream from Optional in Java 8 & Java 9.

```java
package com.jbisht.blogs.java9.usingoptional;

import java.util.Optional;
import java.util.stream.Stream;

public class OptionalDemo {

    public static void main(String[] args) {
        // Java 9 style
        getPerson().stream()
                .map(Person::getName)
                .map("Java 9 "::concat)
                .forEach(System.out::println);

        getEmptyPerson().stream()
                .map(Person::getName)
                .map("Java 9 "::concat)
                .forEach(System.out::println);

        // Java 8 Style
        getPerson()
                .map(Stream::of).orElseGet(Stream::empty)
                .map(Person::getName)
                .map("Java 8 - "::concat)
                .forEach(System.out::println);
    }

    private static Optional<Person> getEmptyPerson() {
        return Optional.empty();
    }

    private static Optional<Person> getPerson() {
        return Optional.of(new Person("JITENDRA SINGH"));
    }

    static class Person {

        private String name;

        public Person(String name) {
            this.name = name;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }
    }
}
```

Happy Coding 😀😀😀 !!! If you have any feedback please comment down below.
Let your interest be your driver
Tags: cms, wecoded
Published: 2018-03-08 03:59:24

---
title: Let your interest be your driver
published: true
description: 
tags: CMS, SheCoded
---

It feels like years ago when I shared my story about [How I Joined a San Francisco Startup as a Software Engineer](https://medium.com/netlify/how-i-joined-a-san-francisco-startup-as-a-software-engineer-adc70e54a2). Now, still only a few months in at Netlify, I'm convinced that I've chosen the right career at the right company.

One of the most interesting projects I've been working on lately is reinventing our outbound email ecoystem. There were a few factors (shhh! launch announcement coming soon) motivating us to  redesign all the email templates so they’d stay consistent with how the app works. We also wanted to establish a new mailing architecture that incorporates [Hugo](https://gohugo.io/), [Heml](https://heml.io/) and [Netlify CMS](https://www.netlifycms.org/), three awesome open source projects, to create three layers of abstractions. We used Heml to generate multi-client compatible email templates without hacking through nested tables. Hugo partials come in handy to allow different templates to share reusable code, e.g., email header and footer. Last but not least, integrating with Netlify CMS helped abstract away the code and allow content editors to create new email content using the existing templates.

As the owner of the project, I've been exposed to both technical and non-technical challenges, including project scoping, cross-departmental communications, static site generator workflows, templating languages… there were more, but you get the idea. 

But with each challenge, there was enough motivation to keep me going. One specific example is taking on the challenge of working with Netlify’s open source CMS project. As a marketer-turned-software engineer, it's been my dream to make technologies that favor story telling. Enabling content editors to create and edit the email templates without touching a line of code, and preview the changes in real time, gives them so much more room to help tell users a great story.

One of the reasons why I was so motivated to work on the Netlify CMS integration is because the [documentation](https://www.netlifycms.org/docs/) is so well written, making the project really accessible. Side note: big shout out to the project’s docs team, who is actually a one-woman band led by the awesome [@verythorough](https://dev.to/verythorough). 


My journey to becoming a veteran coder still has a long way to go. I look up to all the fantastic women who have stayed in tech and helped other women getting into the space. To other women and non-binary folks who are just getting started in code, I'd suggest finding out what you love and you're good at, set up your own goals and keep practicing. Also, don't hesitate to reach out to the communities surround you cause that's what make us grow together.

Happy International Women's Day! <3
Nevertheless, Kelly Vaughn Coded
Tags: wecoded
Published: 2018-03-08 03:49:44

---
title: Nevertheless, Kelly Vaughn Coded
published: true
tags: shecoded
---

## I began/continue to code because...
I'm a developer, business owner, manager, entrepreneur, and all-around badass female in the computer science world. (Am I allowed to call myself that? I just did, so I guess it's too late to turn back now.)

I've been building websites as a hobby since I discovered I could create my own guild on Neopets when I was about 11 years old. (I still believe these were the best years on the internet.) Although I'm now being paid to code, I still very much think of it as a hobby. I love the challenge that comes with coding a unique design or complex feature. The more complex, the more fun I have.

While I've dabbled in various languages over time, my favorite place to be is in the frontend, doing custom theme development for Shopify. It's a particularly fun niche because my code is directly helping others launch and grow their own business. I've been working solely on Shopify stores for the past three years and change, and I absolutely love it.

## I want to brag about...
My biggest accomplishment to date is starting a female owned and operated business called The Taproom Agency. What started as just me freelancing is now an agency utilizing the skills of 7 incredibly talented women to help entrepreneurs launch their own businesses. Learning how to run a business and manage others has been a challenge, but one I definitely welcome.

It was never intentional to have a team only consisting of women, but I'm so glad it worked out that way. In a crowded world of agencies, this single fact (aside from the great work we do) really helps us stand out. As an added bonus, not only do I have the opportunity to work with the women who make up The Taproom Agency - I get to work with so many other women (and men) working hard to achieve their own entrepreneurial dreams.

## My advice for allies to support women and non-binary folks who code is....

If there's some advice I could give to another female developer and entrepreneur, it's to stick it out. Push through the hard moments. They'll come, they'll pass, and then more will come. People will tell you you can't do something, you're not talented enough, you don't have enough experience. Prove them wrong.

And most of all, support other women who are aiming for the same goals as you. Focus less on competition and more on lifting each other up. Our end goal should be to get more women interested in a career in computer science. The more women who are working in computer science, the better off we all will be.
Nevertheless, Dina Coded. And Coded. And Coded Some More.
Tags: wecoded
Published: 2018-03-08 03:44:38

---
title: Nevertheless, Dina Coded. And Coded. And Coded Some More.
published: true 
cover_image: https://thepracticaldev.s3.amazonaws.com/i/jmr85czq1ptq8xexn7cw.jpg
tags: shecoded
---

## I continue to code because...

At this point I just can’t imagine not coding. Over the years, coding has become something more than just a work skill for me. I suppose that’s the creative part of coding that I love — when it’s fun it’s an extension of yourself. 

## I recently overcame...

Many bouts of self-doubt while trying to break from my comfort zone and learn a new language, new stack, new tools, etc. I really appreciate supportive and inspirational communities like dev.to when I need to drag myself out of the self-doubt pit.

## I want to brag about…

I finally finished my first SaaS app, [Setlistic!](https://setlistic.com) Yay!

## I’m an expert at...

I’m an expert at seeing the forest through the trees, and being able to break things down and explain things in simple ways that people seem to understand. I typically use those superpowers in my day job, but I may try to turn that into a side project one day.🤔

## I’m excited about...

I can’t wait to learn new things, explore new opportunities and build new apps. It’s exciting to think about people wanting or needing to use whatever it is that you build. I’ve always loved the idea of building things that solve problems for people.

## I look up to...

I really look up to the younger generation of up-and-coming female developers. It’s so great to see the interest. They continue to impress me every day and I look forward to seeing the things they’ll build!

## My advice for other women and non-binary folks who code is...

Be patient….coding is a long game. It’s like building that big snowball a little at a time. Stay positive. Ask for help when you need it. Give back when you can. Be true to yourself in everything you do. 

*Cover Photo by Goran Ivos on [Unsplash](https://unsplash.com/@goran_ivos)*
Nevertheless, Ivy DeWitt Coded
Tags: wecoded
Published: 2018-03-08 03:04:08

---
title: Nevertheless, Ivy DeWitt Coded 
published: true
tags: shecoded
---

## I began/continue to code because...


I began to code because I found the practice of building websites to be an amazing, fascinating experience, and wanted to be part of that process even on a small scale. I still remember my first time cracking open a Squarespace theme and messing around with the HTML & CSS. If only I knew what I was in for at the time.

I continue to code because as the web matures, we need to mature our tools & websites along with it. For various reasons, websites (and the tech landscape in general) have gotten away with a pretty narrow vision and experiences for users. There are countless examples of people not being able to simply sign up for an account due to the fact that a service doesn't recognize their name as a 'legitimate name', or for other reason won't let them use an alias. 

This, along with the fact that many websites have been built in the past without considering accessibility means that we're isolating a significant portion of users who navigate through the web every single day. Now that the internet is pretty much a "must-have" tool for everyone, it's even more important that we create amazing, accessible, and inclusive front-end experiences for all users. 

## I'm excited about...

Learning about accessibility features in website design/development. Also CSS Grid because I thrilled about all things about CSS Layout.

## I look up to...

Jen Simmons! Seriously, if you're passionate about CSS and front-end in general I recommend following her and checking out her YouTube channel.

## My advice for allies to support women and non-binary folks who code is....

Be proactive about providing mentorship opportunities. A lot of times there's pressure on us to be "the best of the best" - especially if you're the first woman/non-binary person in a tech role at your company. Providing a mentor that you can bounce ideas off of and have another level of support can be a big relief in these cases.
Nevertheless, Annie Coded
Tags: wecoded
Published: 2018-03-08 03:00:28

---
cover_image: https://thepracticaldev.s3.amazonaws.com/i/f9xfcp5p57stst2p6szy.jpg
title: Nevertheless, Annie Coded  
published: true
tags: shecoded
---

## I began to code because...

It all started when I attended [Girls Who Code Summer Immersion Program] (https://girlswhocode.com/summer-immersion-programs/ ) (GWC SIP) 2017 at Bank of America. Before this program, I thought coding was too difficult for me and that I wouldn't fit in the coding community; however, GWC SIP proved me wrong.  Attending this program was one of the best decisions of my life. I felt like a new, better person after completing the program. The program made me a proud, confident female coder and showed me the power of computer science. I found a new passion, supportive community, and awesome friends! If I could replay that experience, I would've broken the replay button.   

## I continue to code because...

I want to create and share my innovations with others. I hope my innovations will have a positive impact on the world. I continue to code to show that I can. Girls can! Everyone can! I continue to code in hopes of inspiring others to code.   

## I want to brag about...

the [interactive website] (https://dr-angelina-messina.glitch.me/) about Angelina Messina that I made with my two friends and my teacher from GWCSIP (shout-out to Brenda, Taz, and Elana) at [Hack The Deep] (https://github.com/amnh/HackTheDeep/wiki) in the American Museum of Natural History. Even though the website isn't perfect, I am very proud of it.    

## I'm excited about...

* GWC reunions!!!  
* attending more hackathons 
* meeting other coders 
* spending the summer developing my coding skills 
* starting my college adventure at Columbia University!
 

## My advice for other women and non-binary folks who code is...

* **Believe in yourself.** You can and you will! Don't let stereotypes stop you.
* **Don't give up!** Yes, coding is not easy, but remember why you are coding in the first place and keep going. I promise it is worth it! 
* **Surround yourself with supportive people.** They are the people that you can go to when you feel dishearten and stressed about life and the future. They will recharge you. Cherish them! 
* **Do side coding projects.** Develop your coding skills so that you can build more intricate and powerful programs. 
* **Network, network, network.** Seriously, network. You don't know what opportunities will come your way. 
* **Have fun!** At the end of the day, it's all about enjoying what you do :)
PowerShell List Files Changed in the Last 7 Days
Tags: fyi
Published: 2018-04-08 18:27:10

---
title: PowerShell List Files Changed in the Last 7 Days
published: true
tags: FYI
canonical_url: 
---

$startingpath=”C:\”

$startingdate=$(Get-Date).AddDays(-7)

Get-Childitem $startingpath -Recurse | where-object {!($\_.psiscontainer)} | where { $\_.LastWriteTime -gt $startingdate } |  foreach {  Write-Host “$($\_.LastWriteTime) :: $($\_.Fullname) ”  }

# OR #

foreach {Write-Output “$($\_.LastWriteTime) :: $($\_.Fullname) ” \>\> changedfiles.csv }
Nevertheless, Alanna Risse Coded
Tags: wecoded
Published: 2018-03-08 00:54:34

---
title: Nevertheless, Alanna Risse Coded 
published: true
tags: shecoded
---
<img src="https://thepracticaldev.s3.amazonaws.com/i/dcxtzsyl537j91c35813.jpg"/>

##About me
I'm a 47-year-old web developer. My road of life has included jobs at Apple, Liquid Audio, Yahoo!, Gap, Inc., Guru.com, Williams-Sonoma, Singlebound Creative, and a million other start-ups and small to medium website projects. I started as a QA Engineer, then began developing websites around 1998. I thought I wanted to quit developing so I went back to school and earned a Masters of Fine Art degree so I could teach art. I figured out I'm an engineer at heart and all I want to do is make big things for people, and wouldn't you know it, that's what websites are great for. I also figured out that statistically, women leave the tech industry mid-career twice as often as men do. I stubbornly refuse to contribute to that statistic.

## I returned to code because...

I realized after leaving a great career in web developing that it was the circumstances, not the work that made me want to change careers. I'm back! I owe a great deal to all the women and men over the years who've supported me. I've come back into the web-dev game to mentor and support others.

## I recently overcame...

I worked with a terrible human being. He was a liar, took credit for my work, and was passive-aggressive. I realized that although I couldn't fix the situation, I could choose to refuse to tolerate his behavior. I left and quickly found a better job.

## I want to brag about...

- Twenty years of web developing and I'm learning new tricks faster than ever.

- I’m proud I wrote this article about [the Tech Gender Gap](https://austinstartups.com/the-tech-gender-gap-a-2016-progress-report-on-women-coders-c704a2d6039c?source=linkShare-e5af1688c74a-1520475709)

## My advice for allies to support women and non-binary folks who code is....

- Check your subconscious gender biases.
- Understand women's and non-binary people's struggles. 
- Demand authenticity from everyone you work with. We can't fix the gender gap if we don't talk about it.
- Encourage your kids to code and pursue their interested in STEAM. Make sure your kids -- especially your boys -- know coding is for everyone.
The Hardest Thing is to Keep Going
Tags: wecoded
Published: 2018-03-08 00:52:20

---
title: The Hardest Thing is to Keep Going
published: true
tags: shecoded
---

Or: to my younger self, with love.

Listen: things will be hard, and then they will be easy, and then they will get hard again, because you have earned the skills to imagine the ways in which you can be better. Even when you're learning you'll think: wasn't this easier to take in before? And maybe it was, or maybe you're learning harder and harder things.

Sometimes impostor syndrome comes from within—not in comparing to your co-workers and classmates and the Silicon Valley luminaries you followed on Twitter, but in comparing yourself to you as you were when you were ten years old and burning with the enthusiasm of someone discovering her new world and the way she could impose her will upon it, or even you as you just thought you'd be by now. We often have the least patience for ourselves.

Keep learning, and try not to lock yourself into the futures you can see yourself in now. You don't think you could ever be a manager, but those skills are things that will come to you easier with practice, too, just like code, and those skills are just as important. To be able to estimate, to have confidence in your implementation ideas, to be able to communicate—those are things that demonstrate mastery of craft, too. But it's okay not to force it before you're ready, too.

The tools you use may change and the people you work with may change, but what won’t change is that this work is something that calls to you and drives you to be your best self in a way that will, someday, make you feel like an expert. Someday you’ll *be* an expert. Someday you’ll feel confident saying “I don’t know, but I’m sure I can figure it out” and it’ll be true.

When you can’t see what lies ahead of you with any certainty or any knowledge of payoff, the hardest thing is to keep going. What I can tell you is that if you keep going, if you find friends and peers and mentors to support you (and you will) and take care of yourself (it helps, I promise), you’ll eventually find yourself in a place where you realize that you have everything that you need.

There will be days when everything feels like it’s fine and you’ll feel fulfilled by your work and still feel like you’d prefer to just lie down because (for better or for worse) you're not a formless energy cloud of programming knowledge and your body has just decided to rebel. Sometimes work will be great but some dude you’ve never even heard of somewhere across the country will unleash a waterfall of hot takes about whether people like you should be programmers and you’ll just feel *so very tired*. Give yourself a break, do what you need to get back on your feet. The needs of the mind and the body are needs you’re allowed to have. The productivity can come later. You have plenty of time yet.

You’ll never be done learning or improving, and you’ll never get a trophy that says you get to be done and that everything will be perfect smooth sailing from here on out. But like all hard things, carrying on gets easier with practice.
Nevertheless, Jess Purcell Codes
Tags: wecoded
Published: 2018-03-08 00:42:07

---
title: Nevertheless, Jess Purcell Codes
published: true
tags: shecoded
---

## I began to code because I love to make things

When I think about it, I started coding in my early teens, making webpages in HTML. I loved the problem solving aspect of creating something from scratch and the control I had over how the end result looked. As a maker and Architectural designer, I still love programming for these reasons today.


## Learning to Code has enabled me to make my own career path

Learning to code has enabled me to automate processes, not only for myself, but for others in our Architecture firm, giving us more time to focus on Design. 

Being able to code allows me to combine my passions for technology and Architecture into a career that I love.

Being able to program means that, using tools like Unreal Engine, I have a higher level of control over how users interact with VR experiences.

Using visual programming tools, like Dynamo BIM, not only enable me to automate workflows for our firm, but are approachable enough that I can encourage other users to start hacking themselves.


## I recently overcame very serious impostor syndrome

As someone who never went to school for programming, and knows just the smallest amounts of a couple programming languages, I had a hard time identifying as a woman programmer. As someone who went to school for Architecture and spends most of my time programming using visual node based programming tools, I felt I didn't have a right to compare myself to traditional programmers.

As I work more with various tools and languages, I've come to an understanding that programming isn't about what language you know, but about knowing how to break complex problems down into very small scale specific steps. My journey of becoming a design technology specialist has made me feel more comfortable calling myself a developer.



## My advice for allies to support women and non-binary folks who code is....

Do what you love, find what you're passionate about and bring those things together. Technology isn't going anywhere, and if you can find a way to use programming to add value to the other things you love, then there will always be new opportunities for you to learn and grow.
Nevertheless, Frances Coded
Tags: wecoded, latina, tech
Published: 2018-03-08 00:28:52

---
title: Nevertheless, Frances Coded 
published: true
description: Why I continue to code as a Latina in tech.
cover_image: https://i.imgur.com/TRV4VWR.jpg
tags: shecoded, latina, tech
---

# I continue to code because...

The Bureau of Labor reported in 2016 that women made up only 25 percent of computing-related occupations. And when looking at women of color like myself, the numbers become even more ridiculously dismal with Latinas and Black women holding only 1% and 3% of computing jobs, respectively.

So what can one conclude from all this?

Well, first, let me provide some context.

A unicorn is a startup company valued at over $1 billion. The term was coined because the chances of a startup becoming a unicorn are very statistically rare (about 1.28% likely to happen).

This means that according to those standards, I'm quite literally a "unicorn" in the sense that I'm part of the 1% of Latinas that considers herself a die-hard software engineer.

Now I became aware of this isolation a long time ago and have since developed a strong desire to want to motivate and aid those who want to enter the tech field but may not feel like they'll fit in.

But to truly break down this stereotype, we need to have more Latinas pursuing tech careers. 

## We must lead by example and inspire others who look like us to show them that yes, Latinas can indeed code and lead in the tech industry. 

In any industry, really.

And **THAT** is why I continue to code.

---

*Image courtesy of [Miguel Á. Padriñán](https://www.pexels.com/u/padrinan/) on Pexels*