* Posts by AndrueC

5089 publicly visible posts • joined 6 Aug 2009

Use an 8-char Windows NTLM password? Don't. Every single one can be cracked in under 2.5hrs

AndrueC Silver badge
Thumb Up

Re: And this is why you shouldn't use the same password/username on multiple sites.

Another reason why your email address is your username is A Bad Thing[1].

Unless you use a DEA system and register a different email address for each site ;)

That also makes it easier to see which site has been compromised.

AndrueC Silver badge
Happy

Just to extend the excellent replies I'll add that computers don't normally store your password and compare what you have entered with that. Instead when you enter your password for the first time they run it through an algorithm that converts it into something completely different. That's what they store.

Every time you log in they take what you have entered and run it through the algorithm and compare the result with what they have stored. Thus no at least half way sensibly written system has a record of your password. This is great because if the system is compromised your password is still unknown.

Password hacking as others have said is the process of finding 'some text' that when run through the same algorithm produces the same value. Once they have this they can log in using 'some text' as the password.

RIP Dr Peuto, Zilog and Sun's bright SPARC

AndrueC Silver badge
Boffin

Ah yes, the old register exchange shuffle. And for hard core you could access the high and low bytes of the index registers. Actually using them for indexing was in any case quite slow. That was one reason why I didn't like the 6502. Having taught myself assembler on the Z80 having to constrain myself to only one register or trust in the speed of page zero felt weird.

The other reason was that I just preferred the syntax. <operation> <target>, [<source>] and ()s to indicate an address reference seems more intuitive.

LD HL,1234

LD A, (HL)

or

LD A, (1234)

For the uninitiated both read memory location 1234 into the accumulator. The use of HL demonstrates the Z80s partial support for 16 bit values. It could do 16 bit arithmetic:

LD HL,1234

LD DE, 5678,

ADD HL,DE

Although there were faster ways of doing it, thus betraying its 8-bit nature.

AndrueC Silver badge
Joke

Rodney Zaks: "Interfacing up in the Loft"

Sounds like it should have come in a brown paper bag :)

AndrueC Silver badge
Boffin

Re: I have a feeling that was the first one I owned too

Wasn't there also something 'creative' about how you communicated with the sound chip and with the joystick? Something about putting one of the chips into an odd mode.

Ah, possibly this.

"The CPC keyboard is directly connected to the AY chip - Thus, the keyboard service routine (which runs as an interrupt service routine) is accessing the AY ports directly.

Accessing the sound chip sometimes needs non-atomic operations like "register select" + "register write" - If the interrupt service routine for the keyboard collides with such non-atomic access, it (or your own code) might become upset."

AndrueC Silver badge
Happy

Re: I have a feeling that was the first one I owned too

...although I seem to recall the cover of the edition I had being pink, and google tells me otherwise.

Mine was blue/white with a picture of a 'planet' and a lightening bolt apparently gouging a canyon into it.

the Amstrad I had at the time

Which Amstrad did you have? I eventually moved from the Speccy to a CPC6128. Much as I loved the Speccy the CPC has to be my favourite ever computer. The Speccy was a good introduction to programming but the CPC was a more capable and interesting machine. Locomotive Software did a great job with the BIOS and the BASIC implementation.

Mind you I remember a letter in one of the Amstrad mags from someone wondering what CPC stood for. It was hilarious when the editor pointed out the obvious.

AndrueC Silver badge
Facepalm

I knocked my copy off a table and onto my foot one night while trying to get to the toilet. I regret to say that I swore at it. I shall forever feel shame for such a blasphemy.

But damn, it hurt.

AndrueC Silver badge
Thumb Up

Re: Halt and Catch Fire

waits for a grumpy old sod to complain it's not THAT old

The first computer I ever programmed had a Z80 in it. It was a Sinclair Spectrum, 48K RAM, rubber thump keyboard. I shall forever have a place in my heart for the Z80. It was a bloody good design as proven by its continuing use in products even now. Albeit clocked a bit faster than the dear ol' Speccy was :)

It's a shame the Z8000 never had the same successful career, but at least it was appreciated by some.

From Red Planet to deep into the red: Suicidal extrovert magnet Mars One finally implodes

AndrueC Silver badge
Joke

The problem was that, while Mars One had plenty of flashy demo videos and public soundbites, it was worryingly vague on the specifics of, you know, getting people to Mars safely and keeping them alive.

Sounds a bit like the Brexit campaign.

High-speed broadband fiber in America: You want the good news or bad news first?

AndrueC Silver badge

Re: How can this "micro trenching" possibly work?

when NY flooded a few years back, lots of Verizon copper got damaged, so got replaced with fibre, which doesn't fall under competitive access regulations

Yeah I don't think that could happen here. BT has to provide equivalence of access to all Communication Providers regardless of medium. They are sometimes allowed an exemption from the normal margin squeeze tests for significant investment (they were allowed to charge other CPs what they wanted in the early days of FTTC for instance) but they wouldn't be allowed to just exclude other CPs by rolling out an incompatible technology.

Although switching copper for fibre would present a slight conundrum because at the moment only a few CPs have signed up for BT's FTTP offering. Ofcom would have to decide how to tackle that - do you just shrug and say 'tough titty' to those CPs that have yet to embrace FTTP? If so what about their customers?

AndrueC Silver badge
Meh

Re: How can this "micro trenching" possibly work?

Having a single entity own the physical infrastructure but allowing other entities to use it doesn't have to be socialist. That's the essence of LLU. It's what the UK's British Telecom has been forced to do for nearly twenty years now.

Competitors can pay BT to carry traffic from their customer all the way back to their own servers. Or they can pay BT to carry the traffic to a convenient POP where they themselves will take over (or arrange for another company to do it). Or they can pay BT just to carry the traffic to the exchange then they will take over. Interestingly some of BT's competitors are even offering their own wholesale service using BT infrastructure these days.

In fact BT have been required to allow competitors access to its poles and ducts for several years although few competitors have been able to make the numbers work - possibly because it's a PIA :)

But does this strategy work? Hmmm. If you want everyone to have a choice of ISP and expect that to drive down costs, then yes. Almost everyone in the UK has a choice of a dozen or more ISPs. And internet access is pretty cheap. It's also ubiquitous and is adequate for most people most of the time. However what it isn't is world record setting fast.

What a re-leaf: IBM's AI smarts to tell 'leccy companies when their bushes need trimming

AndrueC Silver badge
Joke

Have you had a look at the log files?

AndrueC Silver badge
Joke

So..they've got to the root of the problem?

Sure, you can keep Grandpa Windows 7 snug in the old code home – for a price

AndrueC Silver badge
Meh

My mail server is running Windows 7. At one point several years ago Windows Update broke so I couldn't even keep it up to date. Last year I tried to upgrade it to Windows 10 but after working away for half an hour it failed at the last hurdle. As best I could tell from the log files it was unable to talk to the SSD. Considering at that point it had successfully copied hundreds of megabytes of files onto it and presumably written/updated various configuration files that seemed to make little sense.

While troubleshooting I tried to update it (in case there was some aspect of Windows 7 it was relying on) and ran the Windows Update fixer. Rather to my surprise when it completed I discovered that the machine could get updates again. So I decided to leave it at that. Maybe some time this year I'll try again. Maybe :)

I should point out (lest anyone think I'm mad) that this is a personal server :)

Amid polar vortex... Honeywell gets frosty reception after remote smart thermostat tech freezes up for a week

AndrueC Silver badge

Re: I admit to having a (not Honeywell) smart stat

Yes, coming back from holiday occasionally shows the limitations of mine, albeit they aren't that big a deal. I can only tell mine that I'm going away for several days and which day I return. Most of the time I arrive back in the afternoon which means that the morning heating is wasted. If I return on a week day (unusual but not unheard of) it can mean returning to a cool house.

Then again I don't go on vacation much in the colder months and in summer the heating (although I leave it on all year round) won't be doing anything anyway. So better control over how it should handle the resumption of normal programming would be nice but is far from essential.

My model (a Honeywell CM67) had an add on module that allowed for some kind of control by telephone. I opted for the Radio Controlled Clock module instead though as that seemed more useful.

AndrueC Silver badge
Meh

I hope someone gets into hot water over this :)

But I still say there is little point for most people in internet heating control. Every house I've owned has taken at least an hour, a couple of hours sometimes to get up to temperature in the afternoon. Just how often is the average person so far away from home that their sudden decision to return allows enough time for the heating to act? Come to that just how often is the average person uncertain what time they will be returning home when they leave?

I'm pretty sure that for most people a 7 day programmable timer would suffice. Maintain temperature between 7am and 9am, 4pm to 11pm during the week. 7am to 11pm at the weekend. Jobs a good 'un.

Using WhatsApp for your business comms? It's either that or reinstall Lotus Notes

AndrueC Silver badge
Joke

Re: Is Alister paid per word?

Ah, that reminded me of one of the sillier Dilbert cartoons.

AndrueC Silver badge
Thumb Up

Re: RE: Alister

And even more primitive was the Sinclair Spectrum. It didn't even have a proper speaker, just one of those piezoelectric thingies. But one clever bugger came up with this.

All that just by flipping bit 0 of port 254.

Oh cool, the Bluetooth 5.1 specification is out. Nice. *control-F* master-slave... 2,000 results

AndrueC Silver badge
Thumb Up

Re: battery state

It's already there, somewhere. My car infotainment system displays signal and battery for my telephone.

AndrueC Silver badge
Facepalm

'colon' and 'semi-colon' because some people are squeamish about the digestive process.

'slash' and 'backslash' because they sound violent.

I mean 'see colon backslash' sounds like an instruction to seriously injure someone, doesn't it?

AndrueC Silver badge
Happy

It's nearly always worked very well for me. My connects to my car via BT and can be used to stream music, satnav instructions and of course handle calls. I have several BT headphones they work seamlessly - a couple from rather surprising distances like the eight metres from my coat to the kitchen at work (going through a substantial stone wall on the way).

I've recently purchased a Game Golf Pro it apparently uses BT to link the sensors on the club grips to a medallion on my belt (and/or my phone) so that I can just pick a club out of the bag and use it and it will register it.

So it works well.

But there was one failure. I bought a hands free mic/headset to use at work with my computer and I never managed to get that to work. Windows 10 would see the device and apparently pair with it but then completely failed to see it as any kind of audio device. But hey - I don't blame BT for that. I blame Windows 10.

Mobile network Three UK's customer details exposed in homepage blunder

AndrueC Silver badge
Joke

Re: Only three?!

At least it wasn't a three for all.

Ca-caw-caw: Pigeon poops on tot's face as tempers fray at siege of Lincoln flats

AndrueC Silver badge
Joke

It certainly sounds like something worth getting in a flap about. Obviously the previous solutions didn't work but that's what happens when you just wing it.

Smaller tech firms just aren't ready for a no-deal Brexit, MPs told

AndrueC Silver badge
Joke

Re: Taking Back Control!

"You were only supposed to take the bloody country out of the EU"

AndrueC Silver badge
Joke

I suppose general uncertainty is better than general failure. Of course neither are as serious as corporal punishment.

It's Shodan embarrassing: Red-faced Rubrik blames public-facing DB on developer ballsup

AndrueC Silver badge
Joke

I bet they aren't foolproof.

Boffins debunk study claiming certain languages (cough, C, PHP, JS...) lead to more buggy code than others

AndrueC Silver badge
Meh

Re: It's "What's the best language" all over again

Perhaps I should clarify what I meant here:

That doesn't mean I never use them but they are used sparingly and typically to provide intent or usage information rather than to actually say what the code is doing.

What I mean is that I dislike seeing this:

// Process all the items in the list.

foreach(var itemToProcess in listOfItemsToProcess) ProcessAnItem(itemToProcess);

or the utterly unforgiveable:

// Increment i

++i;

However the following is acceptable:

// Now that we've got our list of items we need to process them so that when we return the list

// to the caller they are ready to be used.

foreach(var itemToProcess in listOfItemsToProcess) ProcessAnItem(itemToProcess);

In this case that's probably exactly what I'd write however for a more complex code block it would probably be written as:

ProcessItemsToGetThemReadyForUse(listOfItemsToProcess);

I don't hate comments. I only hate comments that tell you things that are obvious from the code - often they are totally unnecessary and the more you describe code the more likely they are to be out of date. But giving an overview of an algorithm or saying whereabouts you are in that algorithm is absolutely fine.

AndrueC Silver badge
Meh

Re: It's "What's the best language" all over again

I have no particular problem with the example you posted, with one caveat, all you're doing is describing the intent of the function then the intent of the code and that's entirely permissible. The only caveat I have would be that rather than using comments to demarcate the steps break them out into methods or functions with an appropriate name. Now on some platforms the cost of function/method calls can be an issue but outside of embedded programming it's rarely an issue.

So for your example I'd prefer to see:

ObtainWidgetFromAppropriateRepository();

PerformSecondStep(); // Obviously these would use a better description.

PerformThirdStep();

..and now there's no need for comments. Even better if it turns out that other code needs to get a widget you now have a stand-alone (or close to it) method to call instead of having to copy code blocks.

That's not a fault of comments, that's a fault of lazy programmers.

Of course, but sadly the world is full of lazy programmers. If you expect everyone that looks after your code to do so in a conscientious and thoughtful manner simply of their own volition you're setting yourself up for failure. You'll either never find enough suitable programmers to meet your needs or else you'll be constantly falling foul of issues because you failed to anticipate the level or incompetence.

AndrueC Silver badge
Happy

Re: It's "What's the best language" all over again

But a personal library of code snippets? Something I prefer to avoid, at least beyond a very limited point. Better to find some tried-and-tested library than to go around reinventing the wheel.

Like all things, moderation is key. Using someone else' work saves time and often reduces bugs. However it can also hide implementation details and it's not good if the developers of an application don't know what some bits of it do. It can also lead to poor design if someone bends their code to use a third party library. Then there are all the niggling dependencies that can trip you up if you want to update. Has anyone coined the term 'Nuget hell' yet?

Of course back when I was a young programmer in the 80s and 90s using third party code was even more risky. You rarely got the source code, the developer didn't have any provision for accepting your revisions and talking to them meant snail mail or a telephone call. Github, Stackoverflow and their ilk have been a boon to software development.

AndrueC Silver badge
Boffin

Re: It's "What's the best language" all over again

I always said that if they could put together a decent description in the English language, then I could help them program proficiently in any computer language.

I've always said that well written code should read like human language. By that I mean using descriptive meaningful identifiers. Instead of

var i=ds.Write(data);

if(i==0) return false;

Which is only vaguely meaningful without comments, do:

var numberOfBytesWritten=dataStore.Write(dataToWrite);

if(numberOfBytesWritten==0) return DataStoreResult.WriteFailure;

Although throwing an exception would probably be a better way to handle it.

I dislike seeing comments in code except as headers on methods saying what they do and offering information about parameters, especially if you're using an IDE that pull that information out and show it as a hint. Comments within code suggest code that isn't clearly written and the big problem with comments is that the compiler doesn't verify them. Out of date comments can be worse than no comments at all.

That doesn't mean I never use them but they are used sparingly and typically to provide intent or usage information rather than to actually say what the code is doing.

AndrueC Silver badge
Unhappy

Re: It's "What's the best language" all over again

I worry about some professional programmers as well. We had a contractor working in C# and he wrote a method that added three or four IDisposable classes to a list then at the end of the function iterated over the list and called Dispose(). It was because he didn't want to rearrange the order of construction and use nested Usings(). It only took me two minutes to rearrange the code and get rid of the list.

I just don't understand how anyone being paid big bucks to write C# code could proceed down that route in the first place.

AndrueC Silver badge
Boffin

Re: strNcpy is also buggy

But the answer to that is to build a framework around the low-level constructs that protects you. That's why all good C++ developers use std::string or some equivalent. There was no need to use strncpy() twenty years ago when I was working in C++. In fact I had a choice of std::string, AnsiString (part of Borland's excellent VCL), CString (part of Microsoft's questionable MFC) and an internal string class we developed that enforced Unicode(*) and was available to all our projects.

Same thing with memory leaks - just use boost::scoped_ptr or boost::shared_ptr (or even std::auto_ptr if you must). For arrays use std::array. For lists use std::list. Stick most things on the stack and use RAII for cleanup. Toward the end of my C++ days we didn't use the new keyword much and almost never used the delete keyword.

In my experience minimising bugs is about an additional step when you're fixing them. The process should be:

1. Diagnose the fault.

2. Implement a fix.

3. Verify that the fix does indeed solve the problem.

4. Review the fix and ask yourself how the code could have been changed to minimise the mistake being coded the first time.

5. Consider adding the results of (4) to your coding standards document or development process.

Steps 4 and 5 are so often ignored or skipped :-/

(*)We wrote data recovery utilities and different file systems store strings differently so by insisting that our core library used that string class we ensured appropriate conversions and considerations.

Japanese astronomers find tiniest Kuiper Belt object yet – using cheap 'scopes and off-the-shelf CMOS cameras

AndrueC Silver badge
Joke

Re: Solar system mass.

The Sun is not a planet.

Careful now. The last time someone declared something was not a planet it triggered an enormous row. Although I think you're probably safe with 'the Sun is not a planet' unless you encounter a particularly belligerent and argumentative astronomer :)

AndrueC Silver badge
Thumb Up

Re: Solar system mass.

the Sun, a G2 main-sequence star that contains 99.86% of the system's known mass

That always amazes me every time I'm reminded of it. The Sun is f'in big!

Furious Apple revokes Facebook's enty app cert after Zuck's crew abused it to slurp private data

AndrueC Silver badge
Happy

Re: It’s a rotten corporate culture

There are times I find the survival of humanity has been against all odds.

You're not the first person to think that.

"According to the story in Ringworld (expanded in the Known Space novel Juggler of Worlds), the Puppeteers intervened with human reproduction beginning several generations in the past, with the intention of breeding humans for luck. This would be possible because they believed luck to be an inheritable psionic ability. They suspected such an ability was latent in humans already, having come to regard humanity as an unusually lucky species."

Ouch, Apple! Plenty of iPhones stuck in tech channel. How many? That's a 'wild card'

AndrueC Silver badge
Meh

Re: Apple boredom

And digital watches in the late 70s. Seems like it's normal product lifetime. From new, to innovative to meh. I'm quite impressed that Casio have managed to maintain interest in their products, G-Shock is probably mostly responsible for that. Someone had the right idea there. I've got two G-Shocks and the second was bought just because I fancied a change. It's rare for me to fall victim to that kind of consumerism.

The only other thing I buy for no good reason is new golf clubs :)

Worried about Brexit food shortages? North Korean haute couture has just the thing

AndrueC Silver badge
Meh

Re: Ahh...

From the other side of the Atlantic... Are people _really_ saying that 'supermarket shelves will be empty'?

Some people are, yes. In practice I doubt it will quite that bad - a few sections of some shelves (fresh fruit and some veg mainly) might start looking a bit sparse but I don't think anyone is at risk of starving.

Will Brexit mean that the EU won't take the UK's cash in return for goods? Really?

It's not about money. It's about the bureaucracy that international trade requires. You can't just rock up to Portsmouth docks with a ship full of bananas and expect to unload them. They will need to be inspected. There will be import duty to pay. A hundred-and-one forms to be signed. The great thing about the EU was it has agreements in place to streamline this stuff. Importing goes fairly quickly even for stuff coming from outside the EU because everyone knows the EU's processes.

From March 29th as it currently stands no-one is going to know what to do when a cargo hold of bananas turns up. And if by some miracle a process is in place it sounds like it'll be very paper based and inefficient due to a lack of software.

Will our shops run out of stuff to sell? Highly unlikely. But some stuff is going to become a bit more expensive and/or become a little harder to find.

Microsoft delivers a second preview of Visual Studio 2019 (a Redmond thing we actually like)

AndrueC Silver badge

Re: That extra space...

Thanks for that - finding stuff in the feedback app is next to impossible.

Ain't that the truth. I've used some unpleasant forums in my time but the VS community one is lousy.

It is possible to get good responses from the MS guys on there though which is why I keep reporting stuff. Just a pity that my most recent report can be summed up as 'P2 buggered up mobile development' :-/

AndrueC Silver badge
Unhappy

Re: On my wish list

It launches in about 10 seconds but then spends another half a minute to a minute loading the solution all the while trying to kid on that it's ready for work. No wait cursor, see? Ah but just you try and actually do something and suddenly you'll find your clicks being ignored or 'hang on a moment' windows appearing.

VS startup is like some vindictive, masochistic tease. It'd be better if it just left a 'please wait' message up until it was done. Instead we have to play the guessing game of prodding it at random intervals until it finally starts to respond in a useful way.

AndrueC Silver badge
Happy

Re: That extra space...

They could give some of us even more space if they tried a bit harder.

But it's contentious. There's clearly a lot of people don't like the removal of the title bar.

AndrueC Silver badge
Unhappy

Unfortunately it seems to have broken mobile development. The debugger keeps crashing out and the app I was working on (Android/Xamarin) kept having random problems as well. I had to give up on the preview and go back to 2017 eventually.

NASA's Opportunity rover celebrates 15 years on Mars – by staying as dead as a doornail

AndrueC Silver badge
Thumb Up

A totally silly and impractical idea. And yet..damn' that would be cool. It gets my vote :)

Data hackers are like toilet ninjas. This is not a clean crime, you know

AndrueC Silver badge
Joke

Re: Inquiring minds want to know...

Obligatory Dilbert :)

Nothing 'unites teams' like a good relocation, eh Vodafone?

AndrueC Silver badge
Facepalm

Couldn't work out how to use teleworking effectively then? Sounds like they need to get touch with a good communications provider :)

Nissan EV app password reset prompts user panic

AndrueC Silver badge
Meh

Re: Hey, it's a car maker

Yup. Another example of a 'hardware manufacturer' not understanding how to create good software. Honda are no better.

Peak Apple: This time it's SERIOUS, Tim

AndrueC Silver badge
Joke

Re: RE: DJV

"We can't cure you because you're dying the wrong way."

Reg Standards Bureau introduces the Devon fatberg as coastal town menaced by oily blob

AndrueC Silver badge
Happy

When I was a callow youth I once cycled from Exeter to Sidmouth. Not too bad a journey really with a wonderfully long free wheel down to the beach. Of course going home that wonderfully long free wheel turned into a bit of an arse :-/

This escapade can be dated by the fact I went there to see DevonAir doing an OB event :)

Fake 'U's! Phishing creeps use homebrew fonts as message ciphers to evade filters

AndrueC Silver badge
Meh

If you make something idiot proof, someone will just make a better idiot.

Encryption? This time it'll be usable, Thunderbird promises

AndrueC Silver badge
Thumb Up

I found out why I changed. I use a DEA system for email so I need to be able to change the From: address to anything when creating an email and I need the mail client to be able to set the From: address from the To: field when replying to an email. Out of the box TB can only do this by requiring the user to manage multiple identities which is a bit tedious. Creating the first email for a contact means first creating an identity for them and over time you'd end up with a lot of identities in the list.

Thankfully there's now a TB add-on called 'Virtual ID' which looks like it can do exactly that. That's actually more elegant than the previous client which required me to write a slightly complicated script.