Author Topic: The computing stuff rant thread  (Read 403162 times)

Chris S

Re: The computing stuff rant thread
« Reply #1625 on: 17 May, 2018, 09:34:58 pm »
It would appear we now have two laptops in the household that refuse to install the Windows 10 "Creators Update" (FFS, really?) and keep whining about updating every few hours, only for it to fail once again if you (finally) capitulate to the nagging.

Bloody Windows.
Darn, I just had my  Virtualbox win10 struggle with and update to 1803 after many attempt I found a way to poke it enough to get it up update. Sadly for the life of me I can't remember which stick I used, no it was not the stick with 3lbs steel lump at one end. If my brain kicks in I will return.

Ah yes, Virtualbox. There's a fix for that - you need to change the Virtualisation options. Not so applicable to actual hardware though :).

TheLurker

  • Goes well with magnolia.
Re: The computing stuff rant thread
« Reply #1626 on: 18 May, 2018, 08:01:40 am »
Grumble:
No I'll stop there.  It's swamp code.  ...snip...

Four thousand lines?  For a single file? In 2018? Sheesh.

Who reviewed it? And who approved the merge to master?
This "developer" has a habit of going dark and not adding review invitations to his pull requests. This habit has been remarked upon repeatedly but he won't cooperate.  Nuff sed?

This morning's extra special treat was three lines of code to change a file's extension using substring.  Now this bloke has been using .Net for at least 14 years that I know of and he still hasn't heard of Path.ChangeExtension which has been there since .Net was in nappies.
Τα πιο όμορφα ταξίδια γίνονται με τις δικές μας δυνάμεις - Φίλοι του Ποδήλατου

Mr Larrington

  • A bit ov a lyv wyr by slof standirds
  • Custard Wallah
    • Mr Larrington's Automatic Diary
Re: The computing stuff rant thread
« Reply #1627 on: 18 May, 2018, 12:43:11 pm »
It would appear we now have two laptops in the household that refuse to install the Windows 10 "Creators Update" (FFS, really?) and keep whining about updating every few hours, only for it to fail once again if you (finally) capitulate to the nagging.

Bloody Windows.

Mine dun this.  Switched off the Windows Update service and blew away the \Windows\Software Distribution sub-directory, switched updates back on, swore profusely and eventually downloaded the Windows Update Assistant from Microsith, which did the trick.  It bypassed the failed install of 1709 (which I thought had installed successfully before Christmas!) and went straight to 1803.
External Transparent Wall Inspection Operative & Mayor of Mortagne-au-Perche
Satisfying the Bloodlust of the Masses in Peacetime

TheLurker

  • Goes well with magnolia.
Re: The computing stuff rant thread
« Reply #1628 on: 18 May, 2018, 06:21:19 pm »
Sorry, but I need to whinge about this bloody awful code again.

Two and half days on this so far. Of which half a day was making my changes and writing covering unit tests for those changes. The rest has been "refactoring" the rest of it by which I mean removing lines that...

Code: [Select]
   // ... do nothing or
   if (counter = 1 || (int)counter/50 == (double)counter/50) showProgress()

   // ... apply tests for validity after the variable has already been used
   if (!File.Exists(filePath)) someFunction(filePath);  // filePath cannot be null/empty
   if (string.IsNullOrWhitespace(filePath) {
     logError("some random waffle");
     continue = false
   }

As well as extracting large lumps from the 4,000 line behemoth to other classes to try and get a degree of modularity and single responsibility established and just straightforward fixing of bugs that were obvious by inspection never mind running  trying to run the damn stuff.


Hands up those .Net developers who don't know that Directory.CreateDirectory(someArbitraryPath) will create the full path all the way to the leaf directory and if someArbitraryPath already exists it will say "Fair enough chum" and leave well alone and there is absolutely no need to have three or four lines that create File/DirInfo vars to test for the existence before creating the directory?  No-one? Thought so.  Can I swap you for my colleague?

Oh and "falling rocks*" is bad enough, but turning it from a staircase/ladder into a pachinko machine must be a world's first


* "falling rocks"
Code: [Select]
   bool continue = fnA();
   continue = continue && fnB();
   continue = continue && fnC();
   :
   continue = continue && fnZ();
   return continue;

Ok there are times when you have to use this, but maybe, just maybe, throwing an exception might be a better alternative or even a simple early return?
Τα πιο όμορφα ταξίδια γίνονται με τις δικές μας δυνάμεις - Φίλοι του Ποδήλατου

David Martin

  • Thats Dr Oi You thankyouverymuch
Re: The computing stuff rant thread
« Reply #1629 on: 19 May, 2018, 12:12:31 am »
Sheesh, even I write better code than that. Actually, even my students who haven't grasped the elegance of code tend to write better than that. It is definitely poor undergraduate.
"By creating we think. By living we learn" - Patrick Geddes

TheLurker

  • Goes well with magnolia.
Re: The computing stuff rant thread
« Reply #1630 on: 19 May, 2018, 06:48:25 am »
It is definitely poor undergraduate.
I wish it was that good.
Τα πιο όμορφα ταξίδια γίνονται με τις δικές μας δυνάμεις - Φίλοι του Ποδήλατου

TheLurker

  • Goes well with magnolia.
Re: The computing stuff rant thread
« Reply #1631 on: 08 June, 2018, 08:18:49 pm »
Hells Bells!  Still working on the damned swamp code.

Hands up any "professional" (i.e. paid for it) programmers here that don't know about the various string formatting specifiers available in the .Net Framework?  None?  Thought so.  Today we had some VB6/VB.Net Framework 1.1 code in Framework 4.6 (might be Core 2) C# written in the last 3 months.

Code: [Select]
  displayNumber  = myNumber.ToString().PadLeft("0", 3);

When we could have had...

Code: [Select]
  displayNumber = $@"{myNumber:D3}";
  // Or even olde style
  displayNumber = string.Format("{0:D3}", myNumber);

There were other code constructions off the Ark as well, but my morale is destroyed and I cannot face recounting them here.

Roll on death. His or mine, don't much care which.
Τα πιο όμορφα ταξίδια γίνονται με τις δικές μας δυνάμεις - Φίλοι του Ποδήλατου

Re: The computing stuff rant thread
« Reply #1632 on: 17 June, 2018, 03:23:47 pm »
It's not just style, the top version[1] has a major bug, assuming myNumber is an int or long (your use of :D3 implies that it is).



[1] Ignoring the compilation error, which I guess is not in the original, but only further demonstrates why having to remember random function arguments is vastly inferior to doing it the *right* way
Quote from: tiermat
that's not science, it's semantics.

TheLurker

  • Goes well with magnolia.
Re: The computing stuff rant thread
« Reply #1633 on: 27 June, 2018, 08:06:36 pm »
Swamp code.  The morass that just keeps giving.  A colleague and I have been "pair programming" (think police officers allocated a beat too dangerous for a single PC)  trying to extract something maintainable from this steaming pile of excreta.

Ignore syntax errors in what follows, it's merely to give you another taste of what can happen in silo development with absolutely no peer review of code written by someone who resolutely refuses to try to stay within touching distance of modern coding techniques.

We'll start with a couple of very rough diagrams:

   For object modelling types

          +---------+
          v             |
      [fred]<>----+

   For data modelling types
 
      +----------+
      ^             |
     [fred]------+

The child in the relationship has an attribute Parent pointing to, yes well you can guess.

 
Code: [Select]

 int level = -1;
 if (this.Parent ==  null) {level =1;}
 if (level < 0 && this.Parent.Parent == null) {level = 2;}

 // Code elided to protect delicate sensibilities

 if (level < 0 && this.Parent.Parent.Parent.Parent.Parent  == null) {level = 5;}
 if (level < 0) {throw new Exception("Possible circular reference.")}
 

I actually laughed out loud when I saw that.  It doesn't even need recursion to do it properly, simple iteration can be used.  Something like the very rough and untested fragment below.

Code: [Select]
int level = 0;
var parent = Parent;
while (parent != null) {
  level++;
  if (level > circularRefLimit) {throw new Exception("yada yada yada")}
  parent = parent.Parent;
}
No I don't know what's supposed to happen if your starting instance has a null parent.  Right now I really don't care.

This piece of code has occupied nearly four weeks of my time and at least a week of my colleague's time plus the two or three months it took to "write" in the first place.  $Deity help us.
Τα πιο όμορφα ταξίδια γίνονται με τις δικές μας δυνάμεις - Φίλοι του Ποδήλατου

Chris S

Re: The computing stuff rant thread
« Reply #1634 on: 27 June, 2018, 08:24:31 pm »
That's awesome!

Reminds me of the classic variable name:

var yourRealParentsAre = obj.Parent;

Mr Larrington

  • A bit ov a lyv wyr by slof standirds
  • Custard Wallah
    • Mr Larrington's Automatic Diary
Re: The computing stuff rant thread
« Reply #1635 on: 28 June, 2018, 04:32:42 am »
Jolly well done, NVIDIA!  I have been sitting here wondering why the actual fuck the updated driver you just told me to install tells me it can't find any compatible hardware.  And after poking around on that intertubes, I find it's because you're no longer supporting the Fermi GPU chip.

SO WHY THE ACTUAL FUCK DID YOU WASTE MY BANDWIDTH AND TIME DOWNLOADING AND ATTEMPTING TO INSTALL AN UPDATE THAT WAS NEVER GOING TO FUCKING WORK, YOU IMBECILIC SPUNKFLUTES >:(
External Transparent Wall Inspection Operative & Mayor of Mortagne-au-Perche
Satisfying the Bloodlust of the Masses in Peacetime

hellymedic

  • Just do it!
Re: The computing stuff rant thread
« Reply #1636 on: 11 July, 2018, 04:28:40 pm »
HOW long to install a Software Update?

Thank Glod I have some dishwashing to do!

Mr Larrington

  • A bit ov a lyv wyr by slof standirds
  • Custard Wallah
    • Mr Larrington's Automatic Diary
Re: The computing stuff rant thread
« Reply #1637 on: 16 August, 2018, 07:23:18 pm »
HOW long to install a Software Update?

Thank Glod I have some dishwashing to do!

Quite a long time, if it's my steam-powered laptop.  It's been off for three months.  Updates required for Windows, Open Office, Ccleaner, Notepad++, doPDF, Macrium Reflect, various FruitCo things and CoreTemp.  Which all have to be given the once-over by the Windows Anti-Malware wossname.  Which is quite capable of nomming 70% of the CPU without even asking permish.

The box is actually not that slow if you disable the Windows Update service.
External Transparent Wall Inspection Operative & Mayor of Mortagne-au-Perche
Satisfying the Bloodlust of the Masses in Peacetime

Feanor

  • It's mostly downhill from here.
Re: The computing stuff rant thread
« Reply #1638 on: 16 August, 2018, 08:10:46 pm »
We have a new MS Surface Pro tabletty thing here, and it's taken me 2 days to get it up-to-date with Windows Update.

It wanted a major version update which took overnight and failed at the first attempt, because it came out-of-the box with Pending Updates lurking in it, which required about 3 re-boot cycles to clear before another overnight session got the version update installed.

Then, I un-installed the preview version of Office 365 which wants a subscription, and installed full offline Office 2016.
Only, the un-install if 365 hadn't worked properly and the remenants were insisting on logging in and activating etc, even though the installed office was fully activated.
I had to use one of the MS fix-it tools to rip all of office out by the roots, then re-boot, then re-install Office 2016 which then worked fine.

Pet moan: why the hell do the un-installers not actually work properly?
It's fucking McAfee all over again.


Chris S

Re: The computing stuff rant thread
« Reply #1639 on: 16 August, 2018, 09:22:57 pm »
Pet moan: why the hell do the un-installers not actually work properly?

If you've ever written code for Windows Installer, you'll know why - like many other Windows APIs, it's a bugger's muddle.

Office, like Visual Studio, uses a fully custom "Installation Experience" (over the top of the Windows Installer API) and IME, that's where it gets dirty - as soon as you stray off the prescribed path.

Sometimes installers do things that can't be undone, so the uninstaller doesn't do a perfectly symmetrical job.

Feanor

  • It's mostly downhill from here.
Re: The computing stuff rant thread
« Reply #1640 on: 16 August, 2018, 09:53:54 pm »
Yes, I know.

But MS themselves seem to recognise the problem, and provide a fix-it tool to resolve the issue.
The same KB article tells you how to do it manually ( delete 10 million registry entries, and hidden files ).
So why can't the un-installer do the same thing?
It could if they chose it to do.

I think there's an assumption that you might want to subsequently want to re-install Office 365, and they retain a bunch of stuff to help with that.


Mr Larrington

  • A bit ov a lyv wyr by slof standirds
  • Custard Wallah
    • Mr Larrington's Automatic Diary
Re: The computing stuff rant thread
« Reply #1641 on: 17 August, 2018, 11:11:42 am »
My laptop keeps telling me there's something wrong with the Outlook profile on it, which is decidedly odd as since installing an SSD and freshly-laid Windows last year it has remained unsullied by Office in any shape or form.
External Transparent Wall Inspection Operative & Mayor of Mortagne-au-Perche
Satisfying the Bloodlust of the Masses in Peacetime

Mr Larrington

  • A bit ov a lyv wyr by slof standirds
  • Custard Wallah
    • Mr Larrington's Automatic Diary
Re: The computing stuff rant thread
« Reply #1642 on: 24 August, 2018, 01:33:08 am »
And the other day it dropped its wifi connection and not amount of bad language could persuade it to reconnect.  Reboot; connection restored.  Not long after, it did it again.  After another reboot, the Internets told me that this was probably because some genius at Microsith had, during an update, enabled the option for Windholes to switch off the wifi adapter "to save power".  Even when the fucking thing is plugged into the mains.

Who the actual fuck thought this was a good idea?
External Transparent Wall Inspection Operative & Mayor of Mortagne-au-Perche
Satisfying the Bloodlust of the Masses in Peacetime

Re: The computing stuff rant thread
« Reply #1643 on: 29 August, 2018, 05:15:50 pm »
I’m in Armenia searching hotels in Georgia. So YOYOY is Google maps showing prices in Hungarian Forints?
Quote from: tiermat
that's not science, it's semantics.

ian

Re: The computing stuff rant thread
« Reply #1644 on: 29 August, 2018, 05:56:02 pm »
I’m in Armenia searching hotels in Georgia. So YOYOY is Google maps showing prices in Hungarian Forints?

Because your internet is being delivered from Hungary, probably (or in some way they're using an IP range that is being recognised by the machines as being in the Magyar Republic). Our new mothership internet is evidently based in the Netherlands, it's clog central when it comes to adverts.

In other news, I get home, sit in front of computer for the first time in a week or so to peruse the internets. Everything powered up and peachy. Then *BANG* from behind the shiny iMac and a little swirl of smokes signs what looks like an expensive death warrant. Le grand sigh.

Went and flipped the circuit breaker and it turns out it wasn't the computer, it was the old Belkin router-as-an-access-point that sits behind it. Probably about fifteen years old and it certainly went out with a rather awesome bang. Hmm, now I can try to figure out how to make an old BT hub act as an access point. I figure I just start out with swearing at it. It'll be quicker.

Re: The computing stuff rant thread
« Reply #1645 on: 29 August, 2018, 05:56:43 pm »
Where are you headed ? my info is seven years out of date, but when I looked most of the places I stayed in were on Airbnb

ian

Re: The computing stuff rant thread
« Reply #1646 on: 29 August, 2018, 06:02:42 pm »
Oh, and some fucknumbskill hacked my Netflix account while I was away. I think I left it with an old password which is I guess is still floating around on a list somewhere.

Re: The computing stuff rant thread
« Reply #1647 on: 29 August, 2018, 06:30:05 pm »
I’m in Armenia searching hotels in Georgia. So YOYOY is Google maps showing prices in Hungarian Forints?

Because your internet is being delivered from Hungary, probably (or in some way they're using an IP range that is being recognised by the machines as being in the Magyar Republic). Our new mothership internet is evidently based in the Netherlands, it's clog central when it comes to adverts.

I’m sure you’re right but Hungary’s flipping miles away on a different continent
Quote from: tiermat
that's not science, it's semantics.

Re: The computing stuff rant thread
« Reply #1648 on: 29 August, 2018, 06:43:39 pm »
Where are you headed ? my info is seven years out of date, but when I looked most of the places I stayed in were on Airbnb

Tbilisi then the upper svaneti. The thing is I don’t know how far I’ll get each day on account of the mountains and state of the roads. So Airbnb is no use, there’s no mobile data here and in Georgia it’s about £300 a MB. I just need some idea if an area has a few guest houses on the route or if it’s a post-soviet industrial wasteland.
Quote from: tiermat
that's not science, it's semantics.

Re: The computing stuff rant thread
« Reply #1649 on: 29 August, 2018, 07:30:59 pm »
If it helps, nowhere has (ok, had)  hotels outside of Tblisi (and Batumi, but I wouldn't bother with that), everywhere has rooms/homestays. I would have thought English takeup - especially with younger people - is going to be better than when I went, when my little bit of Georgian I learned went a long way. Older people, it's Georgian and Russian. Assuming you are prepared for a less than 1st world experience, you are likely to have a wonderful time, I can't see that the astonishing hospitality I experienced will have changed.

You haven't mentioned how you are travelling, if you're cycling, good luck. There's a travel advisory against going into south Osetia which might be a route you take to upper svaneti, I would suggest heading west before north. If you have the opportunity, it is worth visiting David Garegi, and I preferred Shatili to the Svaneti. Both are glorious, but the Svaneti was being developed for tourism.

Anyhow, I would use Airbnb to get an address in a town, if they don't have a bed, they will take you to their cousin or some such.

ETA - realised you're cycling, scrap David Garegi, it's the other end of a desert with nothing much in it, beyond the hulk of a command economy village built where nobody wants to live (except for cows, they poke their heads out the ground floor windows and haven't quite worked out how to get upstairs to the hay. Shatili is also more remote and isolated than Svaneti, so probably not worth the bike detour.