* Posts by Doctor Syntax

40471 publicly visible posts • joined 16 Jun 2014

Page:

Programmers: you have to watch your weight, too

Doctor Syntax Silver badge

What do you optimise for?

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away."

A long time ago when XML was brand new my client had a client that wanted to send them jobs to process in XML.

Up until that time work might have been received in fairly simple formats, maybe even as simple as CSV. They would take apart the various elements of data and store them as separate columns in a database that probably only needed a single table. They'd accumulate enough jobs to run a production batch. The data that was slated to arrive by XML was more complex than previously. It was going to require more tables. But they wanted to keep the same approach. We were to optimise for familiarity at the expense of complexity.

My solution was to use XSLT. A style sheet would read the XML and write SQL to add the data. XML was new at this time and there were no existing tools for shredding it into a database. This worked fine in a quick PoC. The trouble was that they were planning to send XML documents with op to 1,000 jobs in them. XSLT used the Microsoft DOM and that would require at least one order of magnitude more memory than the XML it was transforming. Testing this at production scale burst the available memory. We also needed to optimise for memory.

The solution to that was to add a SAX parser as a front end to spilt the incoming documents into individual jobs. It needed only to recognise the beginning and end of the element that enclosed the job. Each job could then be wrapped up and sent to the existing code one at a time. It didn't need to recognise anything in between, just shove it in the bag. Actually it recognised one or two other elements which represented housekeeping information and passed those on as well. We were optimising for memory at the expense of a little more complexity.

Realising that there would be more like tike in the future I wrote the SAX parser to use a simple name-space I devised for my client. I added a further step using SAXON to transform the client's name space into my client's name-space. All it needed was a new style sheet for a new client. I was optimising for re-useability at the expense of a little more complexity.

The next problem was that the database design used multi-column keys to stitch the tables together. It wasn't fast enough. I had to re-do it using surrogate keys. The XSLT had to insert strings which would then be substituted by s sort of macro-processor. We were optimising for speed by adding some really complex code. It was also a maintenance problem for my client because the client kept adding more stuff to the jobs that required adding ore tables, more code to handle the loading and, consequently, more code to get the data out again to format the output for production. We were optimising for speed at the expense of complexity.

As expected the client had a new contract. Even from the start it would have to handle a variety of types of job (more were added later). The answer was to chuck out all the detail tables and replace them with a single text column. The style-sheet would simply generate the appropriate format directly from the XML. It only required the selection of the correct style-sheet for the job-type and writing the style sheets was straightforward. The re-usability optimisation meant that only a new style-sheet was needed for the first transform and the SAX parser needed no changes at all. The horrible macro-processing stuff was chucked out as was all the code to compose the production format from the multiple tables. We had optimised for flexibility by making it simpler overall because of, not despite, that extra step at the front to transform the name-space.

TL;DR If you know what to add and what to take out the general-purpose solution can be simpler than that dedicated to a specific task.

Doctor Syntax Silver badge

Re: respect?

Another site that requires javascript and cookie option pop-up to show a cartoon. Liam, your point it made yet again.

AI spies questionable science journals, with some human help

Doctor Syntax Silver badge

Re: Sadly

The institutions where the research is carried out could take the matters into their own hands. Instead of papers sending a new paper to a journal the author(s) submit it to their libraries. A library then decides on its merit, probably by consulting the department head or maybe the institution has a publishing committee. If it's OKed it goes on the library's website. The journals are cut out completely.

It might cost the libraries to do that but it's offset by the saving on journal subscriptions.

Doctor Syntax Silver badge

"A questionable journal is one that violates best practices"

With "best practice" being a link to a site that's supposed to tell me about best practices. Blazoned across the bottom of the site's front page is "This website uses cookies to ensure you get the best experience. Learn more about DOAJ’s privacy policy." with a button to click. It's not even an opt out option. Somehow I lack confidence in their notion of what might constitute best practices.

Researcher who found McDonald's free-food hack turns her attention to Chinese restaurant robots

Doctor Syntax Silver badge

Re: Tricky

As it would be using BigCo's logos etc. A copyright writ on the hosting company could have got their attention PDQ. Possibly the fake site could have been linking direct to BigCo to get the logos. In that case there a slightly trickier option to achieve what Zakspade did without hacking the site at all. First set up a new set of logos, ensure all BigCo's sites linked to them and then replace the original logos with messages saything "We're spammers ....". That's trickier in that (a) you have to be sure you've updated all the old links and (b) some eejit in BigCo's marketing won't have got the message and will send out emails with the old URLs.

Doctor Syntax Silver badge

Re: food fight

The quiche of death.

Doctor Syntax Silver badge

"Crims could also make FlashBot foul office systems up or steal intellectual property."

Why do something boring like that when you could set the robots up to have a food fight?

Alibaba looks to end reliance on Nvidia for AI inference

Doctor Syntax Silver badge

Even Trump should have been able to predict this.

His thinking (sic) is that by restricting imports to the US (by tariffs) he can encourage home production. It must follow that by restricting imports to China (by sanctions) he can encourage home production there.

The only remaining question is which country will get in gear faster and the answer to that is the country with most effective existing manufacturing economy.

Techie fooled a panicked daemon and manipulated time itself to get servers in sync

Doctor Syntax Silver badge

That's what happens when you get out of sync. You have to drop in a few synchs to make up the shortfall.

Doctor Syntax Silver badge

"Some folks never really got it no matter how hard we worked."

Not surprising if they were major outsources. It would have got in the way of doing things the cheapest way possible and then what happens to the profit.

Uncle Sam doesn't want Samsung, SK Hynix making memories in China

Doctor Syntax Silver badge

"What tribute Samsung or SK Hynix will have to make in order to convince the Trump administration to grant these licenses remains to be seen."

Announce that the US will bear the brunt of any shortfalls in production. Trump should be happy with that. It will help his balance of payments.

RefreshOS 2.5: The Debian remix that borrows from every desk in the house

Doctor Syntax Silver badge

Re: nice of them

I've just spent about 10 minutes going through the KDE apps I use regularly and a whole lot I don't. All have traditional menu bars, none have hamburger menus. Possibly there are some that default to a hamburger menu that allow for further customisation - some non-KDE apps are like that - in which case I must have forgotten about them. KDE is a rather broad church and there seem to have been a few side hustles so I couldn't be sure of all of them but for day-to-day it's almst entirely the non-KDE stuff which insists on looking like it doesn't belong. Krita, admitedly looks weird but it's aimed at the coloured pencil department.

There was just one miscreant: Kexi. It rsulked because it couldn't find the Breeze icon set. Naughty Kexi.

Doctor Syntax Silver badge

“we counted 37 others…”

And every one better than W11's menu.

Pentagon ends Microsoft's use of China-based support staff for DoD cloud

Doctor Syntax Silver badge

"Microsoft designed its policy of using staff based behind the Great Firewall to comply with government contracting rules"

The letter but not the spirit it seems. Even so, they should have realised it couldn't possibly be acceptable.

I suppose anyone but Microsoft would have found it galling to be lectured on common sense by Mr Signal Leak with him having the right of it.

FTC chair accuses Google of treating GOP's emails as spam

Doctor Syntax Silver badge

PS

nd whatever you do, don't let used* car salesmen run your marketing.

* The salesmen as well as the cars.

Doctor Syntax Silver badge

Seems straightforward enough. Send spam, be treated as a spammer. Don't want to be reated as a spammer, don't spam. Maybe revise the email list? In particular check for return emails - if recipients complain take them off the list.

UK government dragged for incomplete security reforms after Afghan leak fallout

Doctor Syntax Silver badge

"Seems the ICO is marking it's own homework if they have allowed the MoD to dictate the terms of their investigation"

It's the MoD that owns the guns and the MPs (no, not those MPs) so setting the terms would have been a bit one-sided.

How Windows 11 is breaking from its bedrock and moving away

Doctor Syntax Silver badge

Re: Windows is a dinosaur

I thought someone might come up with that but it's a long time since it was developed for those architecures.. How easy would it be to take W11 now and port it to them?

Doctor Syntax Silver badge

Re: Intel couldn’t license Arm cores and build chips themselves.

I never said there was binary compatibility. Intal and ARM do not use the same instruction set and hence their native binaries are different.

If you have "binary" compatibility being marketed then either you have a dual weight "binary" that eats your download and disk and the OS picks out the correct half to run or you have an emulation layer that eats some of your CPU on one of the architectures. Done properly there's no problem. You install the correct flavour of OS and the rest works without wasting resources on your computer.

Doctor Syntax Silver badge

Re: It's not a fetish, it's common sense

I didn't read that line the way you did. I suppose I take a rather old-fashioned dictionary approach to fetish as an obsession. and the reason it is an obsession is because it is common sense. As a result Linux doesn't have problems and doesn't even have to resort to abstraction layers to provide cross-platform portability.

Doctor Syntax Silver badge

Re: Intel couldn’t license Arm cores and build chips themselves.

Unix-style OSes have also been ported to many platforms. It's not so much a matter of having control over the full stack, it's a matter of having a stack designed with distinct layers and well defined interfaces.

As a consequence I can run the same distro on an Intel laptop of a Pi and the same apt install command will install the Intel or ARM version of the application and its dependencies as appropriate, I'm not sure Windows could manage that.

Doctor Syntax Silver badge

Re: 'Many of us'?

I thought it had a micro-kernel with BSD userland.

Doctor Syntax Silver badge

Re: Windows is a dinosaur

"It's hard to predict but even code and concepts from Lyons LEO, ICL.. live on in todays tech world so I would say that provided we don't destroy the planet Windows will live on and evolve rather than die out."

Windows had been built around a single platform. Unix was built with multi-platforming in mind. It's not surprising that OSes with a Unix background (I count Apple's offerings in that) find it easier to adapt.

Doctor Syntax Silver badge

Re: 'Many of us'?

Don't forget Android. It's Linux underneath. And Mac is also sort of Unixish, so I'm told.

Older developers are down with the vibe coding vibe

Doctor Syntax Silver badge

"half of their finished software"

Or their half-finished software.

China turns on giant neutrino detector that took a decade to build

Doctor Syntax Silver badge

"Jiangmen Underground Neutrino Experiment (JUNO)"

It looks like they ran out of enthusiasm before they finished their backronym. "Observatory" would have done nicely.

HP bottom line fattens up on a diet of AI PCs and Windows 11

Doctor Syntax Silver badge

Perhaps this explains the number of refurbished Z-Books on the market. I almost bought one the other week but couldn't persuade my wife myself that I needed another laptop.

Cloud computing has become so normal, it's invisible

Doctor Syntax Silver badge

At some point, "cloud computing" will just be "computing." Or maybe, reaching back further in time, we will call it "data processing" as the nerds from the 1960s did.

When that happens we'll be due for a return of the personal computer. (No, phones and tablets don't count. They're half-arsed thin client that can't even manage a decent keyboard.

FBI cyber cop: Salt Typhoon pwned 'nearly every American'

Doctor Syntax Silver badge

Re: If everybody is compromised

For instance, I ought to be able to "lock" my credit using 2FA linked to my phone (by that I don't mean SMS) so even if someone gets their hands on my info that they can't open credit cards in my name and I would need to unlock my credit using my phone before I'm able to do that, or take out a mortgage or whatever.

Then your phone gets stolen...

When your phone becomes your avatar whoever has your phone becomes you.

Microsoft can't guarantee data sovereignty – OVHcloud says 'We told you so'

Doctor Syntax Silver badge

The longer the process the more the reason to get started.

Doctor Syntax Silver badge

It all seems to me that using the "cloud" is tantamount to agreeing that the "provider" may commit Industrial (or other) espionage on data.

If that's your situation you should have consulted your lawyer before you signed the contract. It's possible that provider may do that possibility does not signify agreement. Agreeing would give you no legal comeback if they do. It's a significant difference.

Doctor Syntax Silver badge

You would need to look very carefully at the smallest print of the contract to ensure that Microsoft had no rights whatsoever to intervene, not even to revoke the licence until the end of its term.

Ransomware crooks knock Swedish municipalities offline for measly sum of $168K

Doctor Syntax Silver badge

Re: Past time to ban paying ransom

In the case of a company make that include the board so that the CEO is no conflict of interest between board and management. The best argument the CEO has is to tell the board "if this happens you go to prison."

Good morning, Brit Xbox fans – ready to prove your age?

Doctor Syntax Silver badge

Re: Emails look like spam

Also https://www.bbc.co.uk/news/articles/cger45p0lv0o

Do they have something to hide?

Google and Zed push protocol to pry AI agents out of VS Code's clutches

Doctor Syntax Silver badge

"ACP, which is still under development, is a standardized protocol for agent-editor communication."

The only question is whether Microsoft will ignore it or embrace it.

Law firm email blunder exposes Church of England abuse victim details

Doctor Syntax Silver badge

A law firm should know better. It should ensure its staff know better. It should have mechanisms in place that don't rely on staff knowing better.

Wastewater monitoring project could catch next pandemic early, says health agency

Doctor Syntax Silver badge

Re: You find what you search for

It should be possible to identify sequences typical of broad groups of viruses and look for variations.

Doctor Syntax Silver badge

"Eminently sensible" doesn't seem something you can attribute to the US's public health olicy: https://www.bbc.co.uk/news/articles/cwy3zjxy3dwo

Doctor Syntax Silver badge

It seems an eminently sensible thing to do. Even with advanced tech public health is always the leased glamorous aspect of health care and yet the most important. Ideally it might be possible to identify sequences which seem to be evolving towards pathogenicity and even start working towards RNA vaccines for them.

Doctor Syntax Silver badge

Re: Truffles

Oh, how quickly we forget.

Online property ad reveals looted Nazi war art, triggers police raid

Doctor Syntax Silver badge

Re: So what have we learned today, children?

So a few blurred objects tell us the gaff is worth turning over.

Putin on the code: DoD reportedly relies on utility written by Russia-based Yandex dev

Doctor Syntax Silver badge

Re: Doesn't matter who wrote it

AFAICS the vulnerability is exacerbated by the registry not being curated. I'd expect rather better maintenance of a typical Linux distro's repositry

The intruder is in the house: Storm-0501 attacked Azure, stole data, demanded payment via Teams

Doctor Syntax Silver badge

"The tech company also urges customers to enable Trusted Platform Module (TPM) on the Entra Connect Sync server to store sensitive credentials and cryptographic keys, thus preventing those from being stolen."

There's no point in storing information somewhere if you can't get it when you need it so TPM isn't a write-only thing. Concentrating all the goodies in it amounts to painting a target on it. It's only a matter of time.

Trump stomps feet, pulls out 't-word' again over China rare earths ban

Doctor Syntax Silver badge

Re: "They have to give us magnets,"

A bigly magnet.

Doctor Syntax Silver badge

Re: High tariffs

"China holds all the strong cards and they know it."

And Trump doesn't.

Doctor Syntax Silver badge

Re: Nice

But to work as intended they need to be low, subtly implemented for specific trades, with a clear understanding of what impact they will have; and usually carefully negotiated so that there's some things a country concedes with its trading partners.

Subtle. Clear understanding. Carefully negotiated.

No, not a problem. Not in the least.

Doctor Syntax Silver badge

Re: > China isn't planning on invading us

"Whats left of the USA would be practically begging China to invade to save them from themselves."

Or Canada?

Doctor Syntax Silver badge

Re: What goes around comes around

I wonder how many - or few - billions of that debt China would have to call in to have Trump fly to China to get the Zelensky treatment from Xi - on live TV, of course.

Doctor Syntax Silver badge

Re: At some point

The US is getting all Trussed up.

Who are you again? Infosec experiencing 'Identity crisis' amid rising login attacks

Doctor Syntax Silver badge

I keep saying this but - Do Not Use An Email Address As A User ID For Anything Other Than Email.

Why?

Because it then becomes the user's universal login everywhere. If they also use the same password everywhere - and you've not way of stopping them because you've no way of knowing - then if one place where they use them gets breached then that's open access everywhere else. The one thing you can enforce is a unique ID.

Page: