Urban75 Home About Offline BrixtonBuzz Contact

The lonely tech post thread.

They can, but this is one of those comparatively rare occasions when an understanding of maths can be useful.

The bottom line is that computers store numbers as a series of bits. Traditionally, those numbers would have been integers, stored in various lengths - 8 bit gives you 0-255, 16 bits gives you 0-65535, and so on.

But that doesn't help with any calculation that involves a non-integer value.

If you have long enough integers, you can apply a "scaling factor" (in software), so that the value 10000 (decimal) stored in your integer is actually interpreted as 1.0000, giving you 4 decimal places.

But that's clunky, and might be good for accounting or other "counting" jobs, but falls down a bit when it comes to scientific calculations, where you might be dealing with a very wide range of numbers. And for that we need floating-point maths. On a computer, floating point maths is roughly equivalent to the way scientists express very big or small numbers as a power of 10: 6.02x10^-33, except they do it in binary. A lot of this is driven by the development of floating point co-processors, to which a CPU could offload the task of performing a cycle-hungry floating point calculation, and that got formalised into an IEEE standard for representation of floating point numbers. Essentially, you have an integer mantissa, which is the number itself, and an (also integer) exponent, which is the power of 2 that the number must be raised to in order to get the real value out.

The snag here is that, even though IEEE 754 (I looked it up) specifies some seriously big word lengths, some numbers in decimal just won't resolve exactly into the mantissa/exponent format. Notably 0.1 - the IEEE 754 equivalent of 1/3 - has the problem that no matter how many 3s you add after the decimal point, it never exactly expresses the value of that fraction.

And there's a lot more of those numbers in the binary system than there is in the decimal one.

I think one of those clunky old-skool programmer skills was in knowing how accurate your answer needed to be, letting the floating point thing do its magic, and then representing the number (ie printing it :hmm:) in a real-world format that ignores those weird digits down in the far end of the fractional bit, maybe doing a bit of judicious programmed tidying up at intermediate phases of the process...

So, if you store and retrieve 0.1 as a floating point number, what you get back is 0.100000001490116119384765625.

But you're never going to present it to your end user like that - you apply a format to the number to enable it to display in a meaningful way, and the size of the error is too tiny to be significant for most purposes. Depending on the practicalities, you might want to round the display of the number to 2 decimal places for, eg., currency, or perhaps 4 for some measurement thing. Either way, the error noise isn't showing up until the ninth digit of the fractional part, so it's lost in the weeds. Except for some very involved calculations with FP numbers, those errors will rarely approach a point where they fundamentally mess things up. Although there are various defensive programming approaches aimed at catching/checking things along the way.

Oops, that went on a bit - I got a bit misty-eyed about the Good Old Days, and long integers, floating point coprocessors, etc.
I was vaguely familiar with that. I would disagree on the binary representation where in a basic CPU 8 bits can represent 127 to -128, the most significant bit used to denote pos / neg.

But even with rounding factors 7-3 is still 4 and not 6. :eek:
 
I was vaguely familiar with that. I would disagree on the binary representation where in a basic CPU 8 bits can represent 127 to -128, the most significant bit used to denote pos / neg.

But even with rounding factors 7-3 is still 4 and not 6. :eek:
Fair point on the sign bit :) I was trying to keep it very simple...

But I'm afraid I lost the thread of the sums discussion while reading it on my phone.
 
Can you post a link when you get a chance please. Just for future reference, I looked but failed to find and post one for you before.

Here it is. I need to verify I got the auto discover correct tomorrow, but it's been one of the days and it's good enough for now!

 
Here it is. I need to verify I got the auto discover correct tomorrow, but it's been one of the days and it's good enough for now!

Cheers!

ETA that is a long list and I presume all are needed to make sure everything works! Good luck tomorrow.
 
I think one of those clunky old-skool programmer skills was in knowing how accurate your answer needed to be, letting the floating point thing do its magic, and then representing the number (ie printing it :hmm:) in a real-world format that ignores those weird digits down in the far end of the fractional bit,
I had a course on high-voltage valve electronics at uni :cool: the lecturer gave the acceptable margin for design errors for voltages etc as 50%.

maybe doing a bit of judicious programmed tidying up at intermediate phases of the process...
print ("Balance:", round(Balance, 2)) :thumbs:
 
I was vaguely familiar with that. I would disagree on the binary representation where in a basic CPU 8 bits can represent 127 to -128, the most significant bit used to denote pos / neg.

But even with rounding factors 7-3 is still 4 and not 6. :eek:
Yes bit of a cop-out I felt, existentialist explained all the simple stuff but the philosophical question went completely unanswered :rolleyes:
 
I had a course on high-voltage valve electronics at uni :cool: the lecturer gave the acceptable margin for design errors for voltages etc as 50%.


print ("Balance:", round(Balance, 2)) :thumbs:
I was thinking more along the lines of rounding out the errors at the ends of critical functions.

Python:
def very_complicated_calculation(...)
    value = GetComplicatedValue(...)
    return round(value, 4) # 4 decimal places enough in this hypothetical case
 
Volunteered myself to do server updates more regularly so I can take toil and have afternoons off when it's sunny.

I kinda get why we don't have them installed on SSDs but I fricken wish we did. It's painful.
 
Oh if you want to do networking in particular. Grab Nmatp andthe nmap cookbook. It’s a great tool for learning about networking, ports all that stuff. Just don’t run it against a computer you don’t own. Just in case. Legal wise.
Thanks for the recommendation. Really interesting, (contrary to my first impression which is why I've taken so long to respond :facepalm: ) really easy to follow, and slightly boggling.

So am I right that if you’ve got someone’s ip address you can:

* circumvent firewalls and anti-intrusion systems to find things like what operating system someone’s running, the software versions of services on any open ports

* use zombie scans, decoy addresses :eek: and spoof MAC addresses and presumably VPN to avoid detection

My firewall says all incoming ports are blocked and all outgoing ports open but the scan shows open ports. Is that because I’m scanning outwards from my network to the router so those ports look open?

Interested to learn how you know who's attacked your system, by the way.
 
Thanks for the recommendation. Really interesting, (contrary to my first impression which is why I've taken so long to respond :facepalm: ) really easy to follow, and slightly boggling.

So am I right that if you’ve got someone’s ip address you can:

* circumvent firewalls and anti-intrusion systems to find things like what operating system someone’s running, the software versions of services on any open ports

* use zombie scans, decoy addresses :eek: and spoof MAC addresses and presumably VPN to avoid detection

My firewall says all incoming ports are blocked and all outgoing ports open but the scan shows open ports. Is that because I’m scanning outwards from my network to the router so those ports look open?

Interested to learn how you know who's attacked your system, by the way.

Not really. If you've got their IP address, more then likely that's the IP of the router. Their PCs will sit behind the firewall and will get an internal address via NAT.

Giving a PC a public IP is normally considered a bad idea.
 
Last edited:
so the public IP is normally that of the router? The private IPs are the internal addresses of the computers on the network?
 
so the public IP is normally that of the router? The private IPs are the internal addresses of the computers on the network?

Yes, that's how it will work for most home setups. Most people's public IP will also change, unless they're paying extra, but how often depends on the ISP.
 
I love how cheap older hardware can sometimes be. I've just ordered a tiny Dell 3060m with an i5 8500T for £150. Ordered 32GB RAM for it for £50.

Slightly older CPU, but it's still got 6 cores. :)
 
  • Like
Reactions: MBV
Any more of these left?

There's an even cheaper one from the same seller with a smaller SSD at £129. It has got space for an additional 2.5" SSD though.


If you only wanted 16GB that would be very cheap as I'd imagine it's already got a single 8GB, so you could just get one more.
 
Fucking Dell monitor has decided to stop accepting video through the USBC passthrough cable. Was fine for 2 years, then - nothing

bought a new cable - too short, sent it back, just bought 2 new cables (bloody expensive, but went for thunderbolt 40GBPS, 240W to be sure to be sure. Nada
And this is on 3 separate laptops (2 PC, one M1 Mac) .

Girding my loins for an afternoon spend on the interwebs trying to diagnose, or do a firmware update, or whatever.

Currently slumming it with HDMI
 
I don't know if it's Veeam in general or just the way ours has been setup, but I find it infuriating sometimes. Like I'm doing checks this morning and it's telling me a lot of jobs have failed, but when I check the offsite backups they're good.

I guess it's another thing I need to play with more. I've got a little NAS that was donated to me and have been meaning to setup backups at home, even if it's a little overkill for my film collection.
 
The trick with Veeam is that by default it believes in "Successes should not alert". And also by default it will retry things 3x. So you can get a few failure alerts, but so long as the rest of the job processes on the 3rd attempt, it's overall successful. Can be confusing at times, for sure.
 
Another “what have you tried to fix your own issue?” Moment with the ostensible head of the first line team that’s making me just sigh. He’s been whinging at the PM in charge of the software for ages.

(issue with the url for some software, he tends to waffle on and on and not actually try checking the url or understand things just digress off topic or a potted history of urls)

Anyway I’ve given him two URLs direct from the SSO page and both work.
 
Our security guy has taken everyone out of domain admins and told us to login via local admin accounts and LAPs password.


Please tell me I’m not going mad and this isn’t how you’re meant to use LAPs?
 
Slightly stressful week at work as the boss is away on holiday so we've basically got nobody to escalate if major stuff breaks. Had a bit of an oh shit moment when a router died, by luckily it was the PSU and so easily fixable. Yet another thing I need to learn and document.

However luckily other then back ground stress we're pretty dead, so I've just been playing. I know there are better ways to remotely access your home network, but as we have some clients using remote desktop gateways, I thought I'd have a play. I've got the Remote Desktop Server role installed on Server 22 and tested it with a self signed SSL cert on my internal network. I've set an A record in Cloudflare and can now ping the VM inside my home network on using my phone's hotspot to test an external connection. I think I've opened ports 443 TCP & 3391 UDP (at least if I scan it says they are open), but suspect this is setup that's stopping me connecting externally. Or maybe it's something totally different. It's been interesting so far anyway.

Edit. And it's connecting. Now to learn more about getting a proper SSL Cert :)
 
Last edited:
One of those days today. Spent the morning working out why Outlook, Teams and One Drive were acting like there was no internet, despite me remoting into the PC. Turns out deep within settings TLS was disabled. Like how does that happen? But at least it was fixed.

I've got another even stranger one. Like really strange. User reports his Outlook calendar isn't working and he can't create appointments in the future. You create one it appears today at the current time. If you create it in OWA it shows in the correct place, but when syncing with the desktop, same behavior, appears today at current time. Checked date, time, region settings on the PC and in Outlook. Online repair of office. Create new profile. Doesn't work.

As there's other small problems I drive to see them and reinstall windows and office. Problem persists. Create a new outlook profile on his PC with my test account which is on a different tenancy. No issues. Create a new outlook profile on my PC with his account details and the problem is there.

Sign in logs in 365 are in GMT, but noticed in Exchange that they are on PST. Bingo. Except the problem isn't affecting any other users on the tenant. WTF?

It's pretty niche, but if anyone has seen anything like this, I'd be really grateful.
 
Back
Top Bottom