teleren/devto huggingface dataset:
PowerShell script to generate a report on all Power BI workspaces and groups in your Microsoft 365 tenant
Tags: tips, powershell, report, powerbi
Published: 2020-01-05 02:31:43

---
title: PowerShell script to generate a report on all Power BI workspaces and groups in your Microsoft 365 tenant
published: true
date: 2019-11-05 00:00:00 UTC
tags: tips,powershell,report,powerbi
canonical_url: https://merill.net/2019/11/get-power-bi-report-m365/
---

Here’s a useful script I wrote the other day. This uses a few PowerShell modules to pull together information about all the Power BI workspaces in your Microsoft 365 tenant. This also includes the names of the Workspace/Group owners.

```
#Install-Module AzureAD
#Install-Module MicrosoftPowerBIMgmt
#Connect-PowerBIServiceAccount
#Connect-AzureAD

$workspaces = Get-PowerBIWorkspace -Scope Organization -All
$wslist = @()
foreach ($ws in $workspaces) {
    $ws
    $owners = $null
    if ($ws.State -eq 'Active') { 
        if ($ws.Type -eq 'Workspace') {
            $u = $ws.Users | Where-Object AccessRight -eq 'Admin' | Select-Object UserPrincipalName
            Write-Host $u
            $owners = $u.UserPrincipalName -join ","
        }
        elseif ($ws.Type -eq 'Group') {
            $go = Get-AzureADGroupOwner -ObjectId $ws.ID 
            $owners = $go.UserPrincipalName -join "," 
        }
    } 
    $item = [ordered] @{
        Id = $ws.ID
        Name = $ws.Name
        Type = $ws.Type
        State = $ws.State
        IsReadOnly = $ws.IsReadOnly
        IsOrphaned = $ws.IsOrphaned
        IsOnDedicatedCapacity = $ws.IsOnDedicatedCapacity
        CapacityId = $ws.CapacityId
        Owners = $owners
    }
    $u = new-object PSObject -Property $item
    $wslist += $u
}
$wslist | Export-Csv .\PowerBI-Workspaces.csv -NoTypeInformation

```
Find Your Priorities
Tags: career
Published: 2019-11-04 23:27:14



At some point in your career, you’ll have setbacks. Whether it’s personal health, family emergencies, burnout, a colleague getting the promotion you wanted, or just plain bad luck. Sometimes life gets in the way of work and you feel like you’re not progressing in your career. It sucks to feel stuck. And you might even question whether programming is the right career for you. There have been two times I can remember where I considered switching careers because I was so unhappy with my day job. It happens to everyone. 

When this happens it’s hard not to compare yourself to your peers at similar junctions in their careers. I’ve done it too. Especially when you hear about engineers at the big tech companies making $300,000 a year. Suddenly you’re wondering what you’re doing with your own career. 

It’s a bit cliche to say but it’s worth mentioning that money != happiness. During the first half of my career, most of my focus was on maximizing my salary. In the latter half of my career, I’ve focused more on maximizing my happiness, even taking less salary so that I could have a better work-life balance that worked for me and my family. I’ve held high paying jobs where I was miserable, and I dreaded rolling into the office every morning. At some point, you have to ask yourself if it’s worth it. And only you hold the answer to that question. 

My personal experiences won’t apply to everyone, however, so I encourage you to spend time self-reflecting and determine what’s most important to you. And do this often because your priorities will likely change as you grow older. 

Also, keep in mind that your salary isn’t the only thing you can negotiate with your employer. Things like time off, work schedule, flexibility to work from home, job title, equity, commuter benefits, and many other things are all negotiable. And don’t have to wait until you change jobs to negotiate these things. You can negotiate these benefits with your employer today. At the end of the day, honesty is what matters when bringing these things up with your manager. If you’re more productive working from home one day a week to avoid the office distractions, let your manager know. They won’t know until you ask. And most likely it’s in their best interest to keep you happy and productive. It’s less expensive for the business than hiring and onboarding a new engineer to replace you. 

Regardless of what priorities are most important to you, always remember that it doesn’t do you any good to compare yourself to others. Everyone progresses at different paces. Some people pick up new skills immediately. For others, it may take months to grok a new framework, and years to become proficient at a new language. New skills require new ways of thinking and approaching problems. It clicks right away for some people. It’s not a bad thing if it takes you a little longer. You’ll get there eventually if you stick with it. 

And that’s okay.

These things take time. Just focus on yourself and what makes you happy. 

---

This post was originally pubished on my newsletter [Junior To Senior](https://juniortosenior.substack.com/)
How do companies make money with data?
Tags: beginners, discuss
Published: 2019-11-04 23:06:02

---
title: How do companies make money with data?
published: true
description: Thats a thing that is not so clear for me, until now
tags: #beginner #help #discuss
---


Ok, we know that facebook, google, twitter, etc make money using tons of data to feed IAs that will feed Ads, and this adds will collect content behavior that will drive YOUR/OUR behavior at some point. Nice, thats a lot of power! We know That they make money with tons of data, generating and managing a huge amount of information, organizing and transforming that information in something relevant and useful. And thats brilliant, and thats clear for me/us, i think. 

Some of us may have heard the phrase "data is the new oil". But, what if i have a huge amount of data, but im just a little service on the web, how can i make money with that?

I would have to wait a big corporation to buy my software? Or i can sell the data by myself? I have to transform the data and serve "information as a service"? What if i have large amounts of data, it has a value? Can i sell raw data, or i have to treat before by myself and sell the possible results and conclusions? And what if im selling information extracted from this large amounts of data, how can i became reliable? Or none of that is true for new players, and this is an unfair game that only majors can play?

Someone, please?
Svelte devlog day 4
Tags: devlog, svelte, interactivefiction, javascript
Published: 2019-11-04 23:16:32

---
title: Svelte devlog day 4
published: true
date: 2019-11-04 22:55:25 UTC
tags: devlog, svelte, interactive fiction, javascript
canonical_url: https://triptych.writeas.com/svelte-devlog-day-4?pk_campaign=rss-feed
---

Well, I'm slowly making progress with #sveltejs . Today I was able to get a simple app up and running on a Netlify instance really really easily.

I just went through this [tutorial](https://medium.com/@edades/simple-svelte-demo-deployed-in-netlify-9f1817452903) and uploaded my files easily to this [repo](https://github.com/triptych/svelte-netlify-server-test). You can see my result at this [site](https://nervous-montalcini-7645ff.netlify.com/).

This gives me great hope about my interactive fiction engine ( right now called [STIM](https://github.com/triptych/stim) ).

Still digging though Svelte tutorials from Udemy, but darn it if it's not a slick framework / compiler.
Angular: Dynamically configure an injector for dynamic views
Tags: angular, typescript, javascript, webdev
Published: 2019-11-04 22:50:57

---
title: Angular: Dynamically configure an injector for dynamic views
published: true
description: 
tags: #angular #typescript #javascript #webdev
---

Imagine you are in a situation the requires you to work with complex views(**host views**, **embedded views**).

As if it wasn't enough...you might also want to **change** these views' **parent injector** at **runtime**.

Let's see an example:

### app.module.ts

```typescript
@NgModule({
 /* ... */
 providers: [
  {
   provide: FooToken,
   useValue: { message: 'default foo value' }
  },
 ],
})
export class AppModule { }
```

### app.component.ts

```typescript
@Component({
  selector: 'my-app',
  template: `
    <ng-container #vcr></ng-container>
  `,
  styleUrls: [ './app.component.css' ]
})
export class AppComponent  {
  @ViewChild('vcr', { static: true, read: ViewContainerRef })
  vcr: ViewContainerRef;

  ngAfterViewInit () {
    const compFactory = this.cfr.resolveComponentFactory(FooComp);

    this.vcr.createComponent(compFactory);
  }
}
```

### foo.component.ts

```typescript
@Component({
  selector: 'foo',
  template: `Foo!!`
})
export class FooComp {
  constructor (@Inject(FooToken) private fooToken) {
    console.log('[FOO]', this.fooToken)
  }
}
```

As you can see, `this.fooToken` will be the value defined in `AppModule`'s injector: `{ message: 'default foo value' }`.

However, now you want to change this behavior, maybe you want to alter the `FooToken`'s value depending on a certain action. 
Imagine you have **multiple tabs** and you would like to **dynamically display** some  **content**, depending on which **tab** is active. Now, in this case, each tab will have its **own component** that will make use of the value provided by `FooToken` and this value can result from other condition.

Let's see how we can achieve this:

### app.component.ts

```typescript
/* ... */
ngAfterViewInit() {
    const compFactory = this.cfr.resolveComponentFactory(FooComp);

    const inj = Injector.create({
        providers: [
            {
                provide: FooToken,
                useValue: { message: this.getMessageOfCurrentTab() }
            }
        ]
    })

    this.vcr.createComponent(compFactory, 0, inj);
}
```

We're using [`Injector.create()`](https://github.com/angular/angular/blob/master/packages/core/src/di/injector.ts#L72) to create a custom injector for the tab components.

*You can read more about `ViewContainerRef`'s API [here](https://angular.io/api/core/ViewContainerRef)*.

Now, `this.fooToken`'s value will depend on the returned value from `this.getMessageOfCurrentTab()`.

## Wrapping Up

Of course, this example is rather trivial, but I think knowing such things can come in handy in certain situations.

A similar example can be found in my [`dependency-injection-playground`](https://stackblitz.com/edit/di-tips?file=src%2Fapp%2Fapp.component.ts).

Thanks for reading!
Driving in Iceland in winter
Tags: iceland, winter, driving
Published: 2019-11-04 22:45:59

<a href=“https://mytraveltips.co.uk/travel-tips/winter-driving-in-iceland/”>Driving in Iceland in winter</a> can be tricky for many people.

You need to check the weather at least every two hours, and remember in the middle of winter in Iceland you only have about four hours of daylight.

Be careful of the wind, it can blow you right off the road if you are not careful.

Would you like a chance to <a href=“https://mytraveltips.co.uk/competitions/win-a-trip-to-iceland/>win a trip for two to Iceland<a/>? Enter competition to take part.
Master of Data Science... but I'm a graphic designer
Tags: python, sql, database, beginners
Published: 2019-11-04 22:44:48

First post! Took me forever to muster the courage to post anything.

So, out of the blue, I've been accepted to study Master of Data Science in Uni! My educational and professional background is in Graphic Design (what?), and I thought (on a whim) that I could apply to the degree and see what happened.

It's not that I don't like design, I love it! I've just always felt that I had a place in the Tech world too. I started off designing websites, then moved onto actually developing them the way I want. I recently started playing with PHP and built my first client portal using the Google Analytics API. "Talking" to computers is such a thrill for me and I want to keep doing it.

I'm super excited to embark on this journey, but I'm also shaking in me boots because it's all so extremely new for me. I'd love to grab any and all tips that can help me in this completely new experience for me, or hear some stories of people who have made choices similar to mine.
How to create your own Spring Cloud Stream Binder from scratch
Tags: spring, java, springboot, microservices
Published: 2019-11-04 22:57:28

---
title: How to create your own Spring Cloud Stream Binder from scratch
published: true
date: 2019-11-04 22:41:44 UTC
tags: spring,java,spring-boot,microservices
canonical_url: https://medium.com/@domenicosibilio/how-to-create-a-spring-cloud-stream-binder-from-scratch-ab8b29ee931b
---

[![](https://cdn-images-1.medium.com/max/2000/0*dMnwKUYeQveeLY1G)](https://medium.com/@domenicosibilio/how-to-create-a-spring-cloud-stream-binder-from-scratch-ab8b29ee931b?source=rss-299466747366------2)

Learn how to **build your own Spring Cloud Stream binder** and the inner workings of Spring Cloud Stream!

[Continue reading on Medium »](https://medium.com/@domenicosibilio/how-to-create-a-spring-cloud-stream-binder-from-scratch-ab8b29ee931b?source=rss-299466747366------2)
Little Linux Flashback (90s)
Tags: linux, computers
Published: 2019-11-04 22:32:21

I started using Linux over 15 years ago. The Linux system (Most often use the terms Linux distributions, because technically Linux is only the kernel) experience has changed a lot over the years.

To give you some perspective, we used these type of computers:

<img src="https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fs-media-cache-ak0.pinimg.com%2F736x%2Fdf%2F5d%2F14%2Fdf5d14bad72dcb8dde2841a4d59fca4b.jpg&f=1&nofb=1">

This was in a time, when Linux did not have any USB support, no wireless network support. You'd plugin the CD (if you had one), and end up in a terminal like this (Slackware Linux):

<img src="https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fwww.howtogeek.com%2Fwp-content%2Fuploads%2F2014%2F06%2Fxslackware-setup.png.pagespeed.gp%2Bjp%2Bjw%2Bpj%2Bws%2Bjs%2Brj%2Brp%2Brw%2Bri%2Bcp%2Bmd.ic.jKGBv6lLvj.png&f=1&nofb=1">

## Configuration drama

Then after installing, you'd find out you are still in a terminal. You had to configure this thing called X. You'd run the command <a href="https://en.wikipedia.org/wiki/XF86Config">xf86config</a>, with which you could configure your graphical settings (screen resolution et al).

But, after doing this, it still would not work. Then you'd run this command many times over trying to get the right settings. After that finally worked (day later), you'd feel happy.

<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/9/94/GNOME_1.0_%281999%2C_03%29_with_GNOME_Panel_1_and_File_Manager.png/915px-GNOME_1.0_%281999%2C_03%29_with_GNOME_Panel_1_and_File_Manager.png">

## More trouble ahead

Then you'd end up with an antique Gnome desktop. But now, the sound card doesn't work. Again, you spend many hours trying to figure out how that works. Now you have to compile the kernel to include the sound card driver, oh dear.

What's that, you want wireless support? Get ready to compile the kernel yet again! If you are lucky, it won't show the message `Kernel Panic`.

<img src="https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F3o6MblMs93tlc151fO%2Fgiphy.gif&f=1&nofb=1">

## Modern day Linux

The modern day Linux distribution is much smoother! For most modern Linux distributions, everything works out of the box, including the desktop environment, all the drivers and everything else.

The only trouble I've run into is this "Secure Boot / UEFI" stuff. But that can easily be solved.

You can easily end up with a desktop like this (or any of the others like Gnome, KDE)

<img src="https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2F4.bp.blogspot.com%2F-gLCdYCvTzY0%2FV1_kYZM6BII%2FAAAAAAAAX8c%2FGKf7NBAjD5oH3uM8sO0SkOUiPQiw7PPJgCLcB%2Fs1600%2Felementaryos-04-loki.png&f=1&nofb=1" alt="elementary os linux">

What's your Linux experience been Like? Is this the year of the Linux desktop? :P

Some more Linux links stuff:
* <a href="https://www.distrowatch.com/">Distrowatch</a>
* <a href="https://ubuntu.com/">Ubuntu, a popular Linux distro</a>
* <a href="https://linuxtoko.com/best-linux-for-beginner/">Best distros for beginner</a>
Why you should consider learning programming
Tags: programming, accounting, software, projectmanagement
Published: 2019-11-04 22:30:19

I am currently working on a software  project for a client.  It is a project management system with an integrated accounting system .

As someone with no background in accounting I begun reading a lot of online articles and watching YouTube videos about the prestigious subject. 

The aim is to have enough understanding of accounting principles and concepts to be able to implement the feature requirements  of the system I'm developing.

After 2-3 weeks of non-stop research and reading, some of the concepts - double entry, credit and debit, journal entry, which accounts go into balance sheet, which accounts go into income statement - which were hitherto very confusing, begun to gradually make sense to me.

Now with the understanding of accounting  out of the way I have manage to implement most of the features. 

Even though there are still some bugs in the app that need fixing, I'm very proud of what I have done so far giving the fact that I started this project with zero accounting background and now hoping to finish and deploy the application as soon as possible.

In the course of my research I found accounting to be a very interesting subject. It gave me  insight  into how to manage my own finances. 

The take home message of this post is this: It doesn't matter which career path you have taken; whether you are an accountant, a lawyer, a journalist, fashion designer, a model, project manager, scholar, teacher etc., consider taking a course in programming and this will open up an endless possibilities  you could never have imagined.

Programing will give you tools and skills necessary to be able to create systems, applications and automate processes applicable to your chosen career. 

Start learning programming today. Study it at your own pace. Don't rush it, it can overwhelm you. 

Start now!!! and thank me later :)
How to make your ✨shiny new ASP.NET Core 3.0 API accessible from emulators and within your network 👀
Tags: webapi, aspnetcore, dotnet, webdev
Published: 2019-11-04 22:15:49

You've just started a new project and decided you want to try out asp.net core 3.0 for your API 👏.

File -> New ... Run your API and you are instantly showered with JSON test data 👇

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

Great work 💪. 

There is just one problem, if you are building this backend for a mobile app, you'll immediately run into that Aha moment, where you instantly remember that you can't access localhost from the emulator 👇

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

No problem, I'll just change "localhost" to the actual IP of my laptop and that will be the end of it 😎

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

Nop, nice try. That will get you one step closer, but now we are dealing with another problem 🙃.

What is going on 😔? The problem here is that IIS Express (used by default in VS2019) is only mapping requests for that port to "localhost".

Luckily this is very easy to fix 👇

1️⃣ Open up the **.vs** folder 📂

It is in the root of your solution. It's hidden by default, make sure to enable "Hidden items" in Explorer.

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

2️⃣ Fire up Visual Studio Code 🔥

Once inside, go to .vs\[Your solution name]\config\ and find the **applicationhost.config** file. Open it up with VSCode.

3️⃣ Change the Bindings ⛓

Specifically we are looking for the bindings that are using the same port number and are pointing to localhost. It should look something like this 👇

```xml
        <bindings>
          <binding protocol="http" bindingInformation="*:53391:localhost" />
          <binding protocol="https" bindingInformation="*:44310:localhost" />
        </bindings>
```

Since this is our dev box, and we would like to make things easy on ourselves, I'm just going to change bindings to allow all.

```xml
        <bindings>
          <binding protocol="http" bindingInformation=":53391:" />
          <binding protocol="https" bindingInformation=":44310:" />
        </bindings>
```

4️⃣ It Works!!! 👏👏👏

Save, Re-launch your API and refresh the browser on your emulator!.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/mlv0c0loj1rlvc0w2p3y.png)
What is readable code?
Tags: discuss, webdev, beginners
Published: 2019-11-04 21:56:09

---
title: What is readable code?
published: true
description: Let's decompose a commonly-used term 
tags: #discuss #webdev #beginners
cover_image: https://www.wyliecomm.com/wp-content/uploads/2018/11/readability.png
---

What makes some code readable and some not?

I recently found myself trying to explain this to a new programmer and the question has stuck with me.

Here's my answer: readable code presents a solution as clearly as possible to <b>_other programmers_</b> by:

1. Demonstrating clear intent
2. Not being longer than it needs to be
3. Keeping variables and logic "close" to where they're used

But when I think about when I've used the term "readability," though, I've often make assumptions about <b>_who_</b> code readable to.  I'd imagine that beginners to programming, beginners to a new language, and perhaps even experienced programmers without context in a particular domain might find perfectly "readable" code still difficult to understand.

What do you think makes code readable?  And how do you think about <b>_who_</b> your code is readable to?
Woodworking has made be a better developer
Tags: codequality, productivity, soapbox
Published: 2019-11-04 21:41:13

Woodworking has been one of my passions for about 5 years now. 99% of what I do is with hand tools - dimensioning wood, planing it smooth, joinery, everything. Some people think it is crazy, but I truly believe it has made me a better developer.

### It has caused me to slow down

The choices I make are more deliberate. I stop to think more. I make sure what I am doing is elegant, extensible, and testable. The result is that I spend less time trying to build something and more time actually building it. 

I'm not saying I write perfect code (I should tell you about some of the bugs I have caused!) but I understand the code more and find it easier to pinpoint a problem when found. 

### I pay more attention to the details

Consistency is a sign of a good, clean code base. If you aren't paying attention to the structure and style of code, then the result is a messy project.

Nothing screams "legacy" more than seeing several different code styles intermixed. Unless you have seen it, you might not understand, but the code feels messy, unkempt, and buggy. It doesn't mean it is - it just comes across like that.

### Visualizing the design in my head

Woodworking is a 3Dimensional space. You need to know how components are going to interact, move,  join together, and assemble. Being able to take a design and visualize how it fits into the system gives you a feeling of freedom. Once you can do that, then you are able to make changes as you go and be confident of the result. 

### Recognizing mistakes early

This dovetails with the previous one. "Fail early and often" is a phrase I hear a lot, but recognizing when something is going to fail is even more important. Nobody wants to spend the time solving an issue only to find out it won't work or causes another problem upstream.

Recognize not only when something has failed, but *will* fail. That will ultimately make you a better developer.


---
Cover Photo by Will Suddreth on Unsplash