Live data from Hacker News

Microsoft is driving users away

christitus.com

371–380 of 422 posts

Re: Microsoft is driving users away

#371

Earlier quoted context omitted.

> Make bash, zsh, ... native for Windows Why? There is PowerShell, able to run on Linux and MacOS. And compared to Bash it is actually readable language.

IMO PowerShell is horrible. It is it an object, or not an object. You don't know, unless you know. How about operators? They make ZERO sense (-eq). They went supreme extreme on namespaces. I could write a paper on how bad PowerShell is. You can keep it. I'll stick with zsh or bash.

don't even get me started on PS.

try this PS script out

  clear
  function Get-Strings1 {
    @('hello')
  }
  
  function Get-Strings2 {
    @('hello', 'world!')
  }
  
  (Get-Strings1).Length
  (Get-Strings2).Length

OUTPUT:

  5
  2
You see, PS will strip away the array for 1-element arrays. (Get-Strings1).Length is 5 because you're really calling Length on the string and not the array (the array doesn't exist at that point). As you can see with (Get-Strings2).Length, if there is more than 1 element it will not do this.

and you'll watch different features crash into each other in bizarre ways. For example, everything is an object but if that's the case how do you output log statements to the console since it's also a shell?

PS is hosted, the default PS host will print out whatever reaches the "top". Think of your PS code as the "first function" with it's own set of returns. The host will print out whatever your code "returns", but this is consistent all the way down the chain.

  clear
  function Get-Strings3 {
    (Do-Stuff)
    return 'hello'
  }
  
  function Do-Stuff {
    Write-Output 'haha'
  }
  
  (Get-Strings3).Length
OUTPUT:

  2
So your returns can be polluted by downstream function calls, including calls into packages that you don't easily have access to the source for. So you'll eventually start writing defensively.

(Do-Stuff) | Out-Null # throws away anything coming out of the function call

And consider what we've demonstrated here. That PS will happily remove arrays based upon runtime state and happily add them based upon runtime state.

If you're confused about why this still happens even though this version uses the return keyword, remember it's PS which means any silly, preconceived notions you have are out the window.

returns does two things.

1. Write-Output

2. Ends execution of the function

If you remove the return keyword it will have the exact behavior it did previously because it's the last statement in the function. And yes, that's how easy it is to accidentally write something to the output and thus turn your return value into an array.

Since I'm on a roll, 1 last example.

  clear
  
  $arr = @($null, 'hello')
  
  $isNull = $arr -eq $null
  
  $isNull.GetType()

OUTPUT:

  IsPublic IsSerial Name                                     BaseType
  -------- -------- ----                                     --------
  True     True     Object[]                                 System.Array
How is the equality operator (-eq) returning an array?

You see, PS has been lying to you all this time, arrays in PS aren't arrays. They're wrapper objects that pretend to be an array to give all sorts of cool magic. One of those magic things being it's propensity to forward function calls on the array wrapper to the elements themselves.

What it's actually doing is calling -eq on each element (think LINQ select) and returning a new array.

Which is useful, you can imagine having a list of COM objects with a name property, you can do a select on the name by just doing ".name" on the array wrapper itself. It has its uses.

BUT

you can't do that for any properties that are on the array (such as Length). Also, PS allows you to attach functions to objects at runtime, if you were truly evil you could attach a myriad of functions to an array object you handed back and laugh as the poor suckers using your code can't understand why calling .Name doesn't forward like it should.

----

I could go on and on and on about PS. I once built a VPS automation solution in PS. My (naive) thinking at the time was that the remoting capabilities for windows was useful so I may as well build it out in powershell. I maintained that solution for 5 years, 4.5 years in and I was _still_ getting surprised by interactions w/i PS.

Here's an exercise for the reader.

write a function that will successfully test an input parameter against null for everything. There's a solution.

Re: Microsoft is driving users away

#372
I use OSX/Linux nearly 100% of the time, with the rare exception being a few years old Windows gaming laptop that I'll occasionally boot to play a game.

Every time I do, I'm blown away with the constant garbage like ads and "news" in the search bar, the bizarre mash-up of UI elements from various generations of WIndows in various menus and the like.

The strongest point for Windows for me is that things like displays and GPU drivers "just work"

Every Mac I've had has had issues with displays/compatibility in some fashion, yet old hardware running windows typically functions fine without any fighting.

Outside of the very minimal gaming I do, there's little value for any of my use cases with Windows.

Re: Microsoft is driving users away

#373

Earlier quoted context omitted.

Yes, but why are these opt-out instead of OPT-IN ? [answer: $$$, "ease of use"] Why must you use command lines to disable features which should have been opt-in, in the first place? Why must one use a 3rd party device (e.g. PiHoles, which ARE awesome ) to disable stuff — particularly when you can't even turn all telemetry off in the first place?

Because Window is, at its core, meant for average, everyday users. Not developers. Not power users. And for the average user, all they care about is having a web browser and access to get the applications they need. I really don't see the harm in the MS store being present. It offers them a user-friendly way to tell people to "just go here and install X" without having to walk them through anything more complicated.

Perhaps, upon initial installation, operating systems should have an option of selecting which operating environment they prefer (e.g. do you want to have all your personal information sent to vendor for customized adds; do you want to have normal OS, or advanced; do you want to use generative AI)?

Personally, my only Windows machine runs Windows 7 Professional 64-bit [turns on once a month]. All my computers sit behind several PiHoles.

Re: Microsoft is driving users away

#374
post #219

Earlier quoted context omitted.

> I hope that more people switch It's reached a point where it no longer really matters. Linux is good enough, usable enough, and supported enough, that getting more users won't change much. It might actually be worse if a lot more users, with a lot of wide-ranging needs and demands, switch to Linux. At least, I am happy with the current state of Linux usability, and no longer care to evangelize the benefits of being…

My own experience doesn't reflect that. I've been using Linux for work for years and tried to switch from Windows to Linux for games. NVIDIA drivers and game support on Linux is not an experience I'd recommend to anyone without experience. On laptop it's awesome, unless you have both an iGPU and dedicated GPU, then switching properly is a pain. WiFi drivers are a hit or miss: some cards are great, some others are not…

I have a few desktops of various vintage in my stable, and one with an Nvidia GPU is effectively totally unstable. Driver updates often break things (one display at 1024x768), the machine often fails to wake from sleep; sometimes it'll wake with one display no longer working (requiring reboot), and various other issues.

I lack the patience to try and troubleshoot it most of the time and primarily use another machine. Usefulness is limited when I can't count on "simple" things like waking from sleep in working state, IME.

Re: Microsoft is driving users away

#375

Earlier quoted context omitted.

> you could turn off auto-update I would not mess with that bit these days

NO! It must always be up to a user to decide to update software. Not all updates work. Not all updates are improvements.

I can’t tell if you’re trolling (or maybe a chat bot)

Re: Microsoft is driving users away

#376
post #225

Earlier quoted context omitted.

> you could turn off auto-update I would not mess with that bit these days

There is a difference between: 1. Updates have been applied (in the middle of your crucial thing). Reboot in 60 seconds. Fuck you if you think you can cancel haha. 2. Updates for the following packages are available. Apply: Now or later. Windows is #1. Linux is #2. Linux does it right. Sometimes, you're in the middle of something, and delaying makes sense. But shutting down on a 3d print job, or in the middle of a ga…

Your comment is orthogonal to mine. Updating is always the right thing to do. How it is scheduled by the OS provider is another story. But refusing to update because you don’t like the scheduler is unreasonable. If you can’t stand the scheduler, change OS.

Re: Microsoft is driving users away

#377

Earlier quoted context omitted.

> The only thing is that most users don't know at all, or don't care. They will learn when they have been hacked often enough. We should stop treating everyone as children. Oh no, children are now treated like adults.

I don't even run antivirus on my personal windows machines.

Indeed 3rd-party antiviruses are useless. Your best protection comes from the OS provider through updates (hence my original message).

Re: Microsoft is driving users away

#378
post #225

Earlier quoted context omitted.

There is a difference between: 1. Updates have been applied (in the middle of your crucial thing). Reboot in 60 seconds. Fuck you if you think you can cancel haha. 2. Updates for the following packages are available. Apply: Now or later. Windows is #1. Linux is #2. Linux does it right. Sometimes, you're in the middle of something, and delaying makes sense. But shutting down on a 3d print job, or in the middle of a ga…

> But shutting down on a 3d print job, or in the middle of a game session fucking sucks. I've legit had windows shutdown in the middle of an online p2p gaming session before. absolutely ridiculous.

Seriously? In 2024? What Windows version?

Re: Microsoft is driving users away

#379

Earlier quoted context omitted.

> But shutting down on a 3d print job, or in the middle of a game session fucking sucks. I've legit had windows shutdown in the middle of an online p2p gaming session before. absolutely ridiculous.

Seriously? In 2024? What Windows version?

It was a few years back, I don't recall the version of windows.

I was just noting that I've had it happen, it hasn't been recent though.

Re: Microsoft is driving users away

#380

Earlier quoted context omitted.

NO! It must always be up to a user to decide to update software. Not all updates work. Not all updates are improvements.

I can’t tell if you’re trolling (or maybe a chat bot)

Not in the slightest. Not in operating systems, not in browsers, not in video games, not in software as a whole.

This is a post about Microsoft ruining their software. That software is distributed through automatic updates. Do you recall the campaign to get everyone on 10? That and the telemetry (spying) they added around the same time convinced me to disable updates. I eventually landed on a linux with only manual updates.

Post reply on HN