Developing on Windows 10 in 2019

I’m not even in IT, I am more or less under the sales departments.

I just want to automate moving PDFs into their respective folders :frowning:

2 Likes

If you work where I do the convo would go down something like:

whistles through teeth for a job like that we’ll need to hire 2 scrum teams of 6 people, a product owner and probably an additional consultant at $1750 per day for Thursdays and Fridays, when no one else is in the office. In about 18 months and $4 million we’ll have an MVP working for you where PDF’s beginning with the letter A will be moved into the folders for PDF’s that start with Æ, which of course none of them do, but we didn’t hire an expert on character sets, as these are cross functional teams.

Alternatively, I’ll get you the rights you need on your desktop, don’t tell anyone, and you’ll be good by the middle of next week.

Good luck :slight_smile:

1 Like

Screams in ADD

1 Like

The manager of our 1st line helpdesk actively refuses to let her staff touch PowerShell. Protip; all the guys who ignore her shit and become proficient get snapped up by 2nd line teams.

2 Likes

SSH Mastery is pretty damn good. Although this guy only uses ssh to connect to VM and the every once in a while copy files.

1 Like

@AnotherDev got to chapter 5 in The first learning powershell book… it’s starting to get a bit confusing… It’s talking about Providers and PSDrives… i’m 2 pages in and i’m not really picking up any of it… my Brain isn’t registering what any of this means or is even used for. I hope it starts to make sense soon i don’t like the fact i’ve read 2 pages and am still not comprehending.

Is this maybe because i don’t have a good enough understanding of file systems?

1 Like

It’s like creating a virtual drive for a path.

https://4sysops.com/archives/powershell-psdrive-in-practice/

If you’re running WSL version 1, you can setup a forwarder to work with Docker running on Windows.

Prerequisits

Install Hyper-V
Enable Developer Mode
Install WSL
Install Docker for Windows (download from Docker Hub)

Go to your Windows Docker settings and click “Expose daemon on tcp://localhost:2375 without TLS”

image

Go to your WSL and run through the setup (username, apt update && apt upgrade -y).

Then install Docker like you would on Ubuntu

Installation instructions
sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common -y                                      
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -                                         
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"        
sudo apt update                                                                                                     
sudo apt install docker-ce docker-ce-cli containerd.io                                                              
sudo usermod -aG docker $USER                                                                                       
### OPTIONAL: Install pip docker-compose module
sudo apt install -y python python-pip                                                                           
pip install --user docker-compose

Set your Docker env in ~/.bash_aliases or ~/.bashrc

export DOCKER_HOST=tcp://localhost:2375

Close out of WSL and restart it. When you run docker commands you should get relevant info:

chris@battlestation:/c/Users/chris$ docker version                                                                      
Client: Docker Engine - Community                                                                                        
Version:           19.03.3                                                                                              
API version:       1.40                                                                                                 
Go version:        go1.12.10                                                                                            
Git commit:        a872fc2f86                                                                                           
Built:             Tue Oct  8 00:59:59 2019                                                                             
OS/Arch:           linux/amd64                                                                                          
Experimental:      false                                                                                                                                                                                                                       
Server: Docker Engine - Community                                                                                        
Engine:                                                                                                                  
Version:          19.03.2                                                                                               
API version:      1.40 (minimum version 1.12)                                                                           
Go version:       go1.12.8                                                                                              
Git commit:       6a30dfc                                                                                               
Built:            Thu Aug 29 05:32:21 2019                                                                              
OS/Arch:          linux/amd64                                                                                           
Experimental:     false                                                                                                
containerd:                                                                                                              
Version:          v1.2.6                                                                                                
GitCommit:        894b81a4b802e4eb2a91d1ce216b8817763c29fb                                                             
runc:                                                                                                                    
Version:          1.0.0-rc8                                                                                             
GitCommit:        425e105d5a03fabd737a126ad93d62a9eeede87f                                                             
docker-init:                                                                                                             
Version:          0.18.0                                                                                                
GitCommit:        fec3683  
chris@battlestation:/c/Users/chris$ docker ps                                                                           
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES 

Yay.

Killer WSL tip – Fix permissions and mounts

sudo vim /etc/wsl.conf

# Add the below config

[automount]                                                           
root = /                                                                                                                
options = "metadata"  

Log out of Windows (don’t lock, Log out or reboot)

When you come back the proper file path will be in WSL

/c/Users/$USER not /mnt/c/Users/$USER

2 Likes

How goes the learnin’?

Did that link help with explaining PSDrives?

1 Like

taking a break since it’s the weekend. They started making a bit more sense didn’t finish the chapter yet

2 Likes

Hmm, so yeah… got the cravings and I reinstalled windows 10 to game (yesterday), since sekiro with my hardware wouldn’t fare well with wine or proton, being such a recent title.

Installed all my stack (which is only node and vscode, was going to start a practice project but things have turned around way too soon).

Today shit has gone fucky and either my VGA or my (grand)motherboard is bad, and I don’t have the resources to get it fixed right now (money and time, basically). So I removed the graphics card and am left with an unregistered copy of windows 10 home (won’t crack it, am more prone to buyng a license it it’s the case).

I don’t want to make a post only about it so if you guys could help me it would be neat.

I won’t be gaming, at least not on PC. Will use this machine only for coding and stuff. I’m learning web development, with a main focus on node and all the standard stack for front-end. Do I lose something staying with windows or just slapping some other less MSesque distro?

Been around with Debs, Buntu, Pop and Manjaro, and I love them all, except for Manjaro which hates my wireless adapter and only has node on snap (don’t even know if it makes any difference)…

I’ll probably have to get new hardware soon enough, either a laptop or even a desktop… should I bother with all the linuxisms? Should I put up with MS crap?

But am I missing something? (I just posted it here cause my main goal is developing, learning to get a job)

1 Like

I’ve done development work with NodeJS on Windows. Outside of environment variables for some NPM packages (like pico logging), I’ve had no issues with PowerShell. For those weird instances where a Bash shell was needed, I had WSL. Or, I just figured out how to make environment variables with PowerShell lol.

Redirection works a bit differently in PowerShell, but you won’t notice unless you’re doing something with binary files. For that I would use cmd or WSL.

I think it helps to keep a clear picture of what a developer environment is. Note, this isn’t to be confused with a development environment. A developer environment is something that you (a developer) use to produce software. You have tools, modules, hacks, passwords, etc. that are available to you. The underlying system doesn’t matter that much, especially in web dev.

If you want to emulate a production environment, then your development environment needs to be a little more constrained and restricted. Regardless, installing Linux bare metal (unless that’s how your job roles) isn’t going to be modeling a production environment. You’d still have virtual machines as your development environment, probably with four servers and a load balancer.

  Load Balancer 
  /             \
Web 01        Web 02
  |              |
  |              |
   \            /
     \        /
         |
       App 01
         |
       DB 01

This is a rudimentary example, but this would be a proper development environment modeling a production environment for a web stack. With your developer environment, you can do all of this locally with containers or services (dev’s choice). When the time comes to get that juicy app into production, you can move toward a virtualized stack, automated tests, delivery pipelines, and all that.

For now, in my experience, writing some NodeJS on Windows is going to suit you just fine.

2 Likes

So basically, production and testing are absolutely separated from developing itself?

Guess I should be fine then. I’m tired of hopping anyways. Too lazy to reinstall everything. Too lazy to be dealing with hardware compatibility also.

This was fairly important to know, thank you <3

I’ll probably focus on virtualization and stuff, so I keep it separated from my main development environment.

1 Like

Yeah, you can integrate them with CI/CD tools such as GitLab, Jenkins, Team City, things like that. But overall the environments are separate entities. With containers it gets a bit more interesting, and technically you can “ship” the same container through dev → QA → staging → production (a lot of companies are doing this).

If you’re just learning the development part right now, it’s best to stay on the single workstation with your workflow, get it working, then move to understanding how continuous delivery, automated deployments, A/B or Blue/Green deployments work.

For sure, it takes practice to get familiar with it all.

VMware Workstation is great, as is Hyper-V and VirutalBox. Docker is awesome, too, but functions differently than a traditional virtual machine.

2 Likes

sir this is the worst ascii vagina I’ve ever seen. Please work on your ascii skills.

7 Likes

Not the worst thing I’ve faped to

3 Likes

Squints real hard

Oh, damn… How embarrassing.

3 Likes

So PSdrives make… enough sense. Still feel vague about what it actually means but i was able to complete the exercises in the book.

Just moved on to pipeline functionality and OMG this is amazing. No more jabberwonky collecting values for variables to print out etc in cmd it just works

3 Likes

Found the next book I am going to buy

1 Like

It’s great, i’m 1/3 through it… excited to get to Powershell Scripting book after this because that’s what i actually need to learn for developing testing solutions.

1 Like