A lot of work has been published surrounding formal satisfaction of boolean predicates since I received my #compsci degree. A lot of mathematical papers exist that probably make sense.
I've been looking for applicability in my own #software #applications. Knowing that #EclipseIDE uses it means that some value can be derived from #SAT.
But to find it, it looks like a lot of reading.
While perusing the plugins that shipped with my #EclipseIDE package, I happened upon something called #sat4j.
It is used by Eclipse to resolve its own source #dependencies, and probably those of our #software #application projects as well.
At heart, this module can solve formal boolean expressions. For Eclipse, it looked to me like the PBS format would be an apt choice for those expressions.
I git trained in boolean logic.
#SAT and #PBS? Not so much.
The problem with this is not, that there are no solutions to work around this #inheritance limitation in the #Java #programming language. Solutions exist.
It's just that implementing those would require yet another load of copy-pasted, #duplicated #boilerplate #code, which is exactly what I was aiming to avoid by using a base interface in the first place.
You're making it difficult to design clean architectures, Java.
That required changing the declarations of the subclasses.
First: IMessage. Success!
Then IPair. No problems yet.
Then ILocateFiles. Uh-oh. Cracks are appearing. Alright: manageable.
Then NamePair. Kablammo! No more #inheritance for me.
Thanks, #Java #programming language, that's exactly the level of #objectOriented architecture I always desired.
And as long as IEmptive is referred to as Consumer<? super IEmptive>, the world is fine, and #Java is fine.
But that has a drawback: the auto-generated parameter value for the consumer is an IEmptive, rather than, say, a ReadFrom or a UserToken. That forces a type cast. This isn't necessary with Optional.ifPresent(Consumer).
So, can I get rid of that typecast?
The first thing I tried, of course, is to add a type parameter to the IEmptive interface declaration, much like Optional.
Why, you way ask? Because as it is in use as a base interface, my classes extend / implement it in various ways. Incompatible ways.
IEmptive > IMessage > Message > XML.
IEmptive > IMessage > IName > Name.
IEmptive > IPair > ILocateFiles, IMessage > ReadFrom.
IEmptive > IPair, IName > Pair, Name > NamePair > UserToken.
So… ReadFrom is IEmptive, and so is UserToken. Both are IPair. And both hold IMessage values, though UserToken implements that as Name.
This got triggered a few days ago by me desiring to add consumer and function abilities to my base interface: doIfPresent(then, otherwise) and doIfEmpty(then), modelled after how #java's own Optional class does ifPresent(Consumer).
But the Optional class is generified. And my base interface thus far hadn't been. And that makes a difference: the auto-injected argument to the Optional.ifPresent consumer is typed to whatever instantiated the Optional - 1/2
#TodayILearned: Multiple inheritance in the #java #programming language is problematic.
In my case, subclasses wind up with the same super interface via multiple inheritance paths. And as long as the super interface isn't generic, this gets resolved just fine.
As soon as we start generifying that super interface, Java will complain that the newly added varying type parameters don't match.
Well, no - 1/2
uk pol, brexit, venting, 320 words Show more
the last general election allowed a really disturbing precedent in this country's constitution to be accepted by default.
parliamentary sovereignty means that a general election beats *everything*. referendum, constitutional reform, international treaty, acts of parliament - all of these can be swept aside by an incoming government. there are procedures, yes, but parliament can pretty much rewrite the UK constitution on its first day of office. all it needs is a simple majority of both houses - and the Lords can be bypassed if they aren't co-operative (and it's a matter of convention that the Lords acquiesce to manifesto commitments anyway).
but at the last election, both main parties allowed the fiction that a referendum - something with no constitutional standing whatsoever, let's not forget! - was more powerful than a general election.
this was preposterous, of course, but went completely unchallenged in 2017. it must not be allowed to stand again. if Labour don't reassert genuine parliamentary sovereignty and insist that an election victory on a commitment to not reactivate article 50 for the life of the next parliament beats any number of referendums, then they might as well not even bother fighting the next election.
"but the lib dems campaigned for remain, and look at them!" ...yeah. sad to say, nobody trusts the lib dems any more; there's a considerable overlap between the people they (are perceived to have) betrayed and the people who want to stay in the EU. also, nobody expected May to last this long or Labour to have been quite so tunnel-sighted.
but that has to end now. if the EU won't let us hold another referendum - or if they do, but the result is "no deal" - a general election MUST then follow, and Labour MUST campaign to remain - and remind everyone that referendums have no constitutional standing. anything else would be an abject betrayal of everything, and everyone, they stood for.
The hidden costs of using Node Show more
@rysiek @freakazoid As I've said elsewhere, every single Node contractor I've dealt with has handed me code documented to be started under webpack-dev-server. Despite the bold heading on the README that it's for development only, they get confused when I ask how I put it on production, and say that's the only way they know how.
#Java SDK 11.0.2 build 7 patches 5 critical security errors that "may be remotely exploitable without authentication, i.e., may be exploited over a network without requiring user credentials."
#Java SDK 11.0.2 build 7 fixes 59 bugs:
“We knew that something was amiss in the first couple days,” said Brad Lister. “We were driving into the forest and at the same time both Andres and I said: ‘Where are all the birds?’ There was nothing.”
Insect collapse: ‘We are destroying our life support systems’ | Environment | The Guardian
Hi, I'm André. I'll be writing about software architecture, cyber security, and UX/UI topics. I'm handfasted. Our family has 2 kids and a dog. We make music.
Server run by the main developers of the project It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!