Once long ago, I was given this SOAP API to interact with.
Now I have no love of SOAP, but at least it fairly rigidly defines the API across different programming languages and technology stacks.
The well defined API consisted of a single function that accepted and returned a string. You passed it JSON and it returned JSON.
But it is a real SOAP API!!! Yes!, it really is SOAP I tell you!
It also had no real provision to return or deal with errors. How about an error field in every result that I can check? And with a numerical code AND a meaningful message that I can pass on to the end user? (And record in my server logs.)
There were a lot of actual underlying API calls present. (in JSON form) (But it's really SOAP I was told.) These API calls were somewhat documented; mechanically from PHP. The real implementation didn't always comply with the documentation however. Results sometimes were, ahem, loosey goosey. (like php maybe?) Over time the returned JSON structures changed from what they originally once were -- without any notice to anyone that might be using this API. There was clearly nothing rigidly enforcing the format on the other end.
Definitely not maintained in the more formal way I would have done it. With API version numbers for newer versions of the official API.
Eventually this other thing fell into disuse.
安倍 晋三
Why is the Japanese Prime Minister's name spelled “Abe”?
Written Japanese has a completely different alphabet than ours, so any Japanese speech written in English must be the sounds of that words “translated” into English.
But in English, Abe doesn’t spell his name. It spells Abraham Lincoln’s nickname. It would be the correct spelling in Spanish, but not English. So why are we not spelling it “Ahbay”?
Seriously, does no one THINK any more??
Background
Microsoft suddenly realizes . . . OMG . . . the internet is NOT just a fad, as Bill Gates had famously said.
OMG, web applications on browsers could make non-Windows platforms competitive! OMG!
Microsoft scrambled. Needs a browser. (classic) Mac already has good internet connectivity baked right in, and a couple good browsers (at that time). Microsoft finds company SpyGlass that makes the SpyGlass browser for Windows. Microsoft buys SpyGlass for $100,000 up front, plus royalty percent of sales. Renames the product Internet Explorer. Guess how many copies of IE are ever sold? Zero.
Microsoft then, over coming years, spends $150 million on IE to develop it into a 'great' browser, if you're a Windows only developer. With addictively great features (if you're a Windows developer). To create a Microsoftized "internet" that excludes non-Windows systems from running web applications. Windows developers (the monopoly) will naturally target IE as their favorite browser. Especially since it has such addictively great sugar coated features.
To further cement a Microsoft-only internet, there is IIS and Front Page.
(aside: Front Page has a four page license agreement, among its terms is that if you create a web site using Front Page, you cannot ever disparage Microsoft, Expedia, and a list of other Microsoft properties. Thus if you visit any web site, and it has tags in the html header section indicating it was created by Front Page, then you know just how credible that web site is when it comes to Microsoft.)
It's like a story of evil, upon evil, upon evil.
Fast Forward
IE loses. Standardization wins. At some point FireFox share goes over 50% and suddenly Microsoft is in panic mode again. IE share is declining. Also this new upstart Chrome browser is gaining market share. So in panic mode a 'kinder gentler' IE that is a bit more standards compliant: IE7.
But not good enough, so IE 8, IE 9, etc. Each becoming more standard compliant. But Microsoft find this is hard to do when the very purpose of IE was to break standards compatibility.
Then Edge, which is an admission that IE has failed. A humorous TV ad by Microsoft about how IE sucks and Edge isn't quite so terrible. You should try it.
Recently
Then Microsoft throws in the towel on Edge, and change its guts to Chromium.
Wow.
Rewind 20 years
Edge is based on Chromium. (Microsoft's doing)
Chromium is based on WebKit. (Google's doing)
WebKit is based on . . . (Apple's doing)
Konqueror.
Remember KDE 3? About 2000. (Before the pooch screw of KDE 4?) It had this cool browser called Konqueror.
In about 2000 I remember reading this on the green site.
First comes the Navigator.
Then comes the Explorer.
Then comes the Konqueror.
Wow. How true those words turned out to be!
How many billions going forward would be saved by cutting SLS from the budget? Maybe that's a good place to start?
And get Mexico to pay for the wall! He vowed to do that in his campaign.
And don't build a wall along the Southern border. Build a Wal-mart along the length of the entire Southern border. Workers can come in from the south. Shoppers can come in from the North to buy foods high in fat, salt and sugar at low, low prices.
Remodel the current SLS hardware into a novel restaurant.
Dear Mr. Trump,
For your cyber convenience, here is a selected subset of Bash exit codes I have compiled just for you:
1 Operation not permitted
2 No such file or directory
13 Permission denied
25 Inappropriate ioctl for device
29 Illegal seek
31 Too many links
32 Broken pipe
52 Invalid exchange
57 Invalid slot
62 Timer expired
67 Link has been severed
69 Srmount error
74 Bad message
78 Remote address changed
87 Too many users
95 Operation not supported
111 Connection refused
113 No route to host
117 Structure needs cleaning
125 Operation cancelled
126 Required key not available
128 Key has been revoked
129 Key was rejected by service
130 Owner died
Which is the most worsest?
A disaster of epic pacifications.
A disaster of epic paginations.
A disaster of epic palindromes.
A disaster of epic panhandlers.
A disaster of epic paragraphs.
A disaster of epic pedestrians.
A disaster of epic pejoratives.
A disaster of epic penetrations.
A disaster of epic penmanships.
A disaster of epic perfectionists.
A disaster of epic perforations.
A disaster of epic performances.
A disaster of epic permissions.
A disaster of epic persecutions.
A disaster of epic personalizations.
A disaster of epic perspirations.
A disaster of epic persuasions.
A disaster of epic philanderers.
A disaster of epic pigmentations.
A disaster of epic plagiarizations.
A disaster of epic polarizations.
A disaster of epic pollutions.
A disaster of epic polymerizations.
A disaster of epic pontifications.
A disaster of epic populations.
A disaster of epic porcupinizations.
A disaster of epic portentous.
A disaster of epic portions.
A disaster of epic positions.
A disaster of epic possessions.
A disaster of epic possibilities.
A disaster of epic posteriors.
A disaster of epic postmortems.
A disaster of epic potbellies.
A disaster of epic practicalities.
A disaster of epic pragmatists.
A disaster of epic prattling.
A disaster of epic preaching.
A disaster of epic precautions.
A disaster of epic precipitations.
A disaster of epic precisions.
A disaster of epic preconceptions.
A disaster of epic preconditions.
A disaster of epic predeterminations.
A disaster of epic predictions.
A disaster of epic prejudices.
A disaster of epic premonitions.
A disaster of epic preoccupations.
A disaster of epic preparations.
A disaster of epic preponderances.
A disaster of epic prequels.
A disaster of epic prerequisites.
A disaster of epic prescriptions.
A disaster of epic presentations.
A disaster of epic presidencies.
A disaster of epic pressurizations.
A disaster of epic presumptions.
A disaster of epic presuppositions.
A disaster of epic pretensions.
A disaster of epic prevarications.
A disaster of epic preventatives.
A disaster of epic pricing.
A disaster of epic priorities.
A disaster of epic prioritizing.
A disaster of epic privatizations.
A disaster of epic privileges.
A disaster of epic probabilities.
A disaster of epic procedures.
A disaster of epic processes.
A disaster of epic processions.
A disaster of epic proclamations.
A disaster of epic procrastinations.
A disaster of epic procreations.
A disaster of epic proctologists.
A disaster of epic profanations.
A disaster of epic professionalizations.
A disaster of epic proficiencies.
A disaster of epic profitabilities.
A disaster of epic prognostications.
A disaster of epic programing.
A disaster of epic progressions.
A disaster of epic prohibitions.
A disaster of epic prohibitionists.
A disaster of epic projections.
A disaster of epic projectionists.
A disaster of epic prolongations.
A disaster of epic promiscuously.
A disaster of epic promotions.
A disaster of epic pronouncements.
A disaster of epic pronunciations.
A disaster of epic proofreading.
A disaster of epic propagandas.
A disaster of epic propagandists.
A disaster of epic propagations.
A disaster of epic propellants.
A disaster of epic propensities.
A disaster of epic properties.
A disaster of epic prophecies.
A disaster of epic prophylactics.
A disaster of epic proposals.
A disaster of epic propositions.
A disaster of epic proprietaries.
A disaster of epic propulsions.
A disaster of epic prosecutions.
A disaster of epic prospectuses.
A disaster of epic prostitutions.
A disaster of epic protections.
A disaster of epic protestations.
A disaster of epic protestors.
A disaster of epic protrusions.
A disaster of epic provocations.
A disaster of epic psychoanalyzeations.
A disaster of epic psychopaths.
A disaster of epic publications.
A disaster of epic pulsations.
A disaster of epic pulverizations.
A disaster of epic punctuations.
A disaster of epic purifications.
A disaster of epic puns.
A disaster of epic pyromaniacs.
Other, please specify in comments.
(Somehow I didn't think this one would work very well as an SN Pole question.)
I had been looking for a replacement for my old Acer Aspire One for years. It was my favorite computer, small form yet capable. It’s had problems with age, so I bought a used HP laptop at a pawn shop a few years ago, but it’s far too big for a lap. They should call those big “laptops” portable desk computers.
I bought another used one from a computer place last year. It, too, was way too big for a lap.
I finally looked on the internet, not expecting to find a lap-sized laptop. But I did. A Dell, only an inch bigger than the Acer. But Dell’s web site refused to sell it to me.
So I bought it from Amazon for about two hundred. Dell had wanted three.
I charged it and turned it on, and was faced, of course, with installing Windows when it should be ready to run; the “new machine setup” was far more onerous than installing Mandrake in the early 2000s.
Then I was faced with the horrible Windows Ten. This is the absolute worst operating system I’ve ever used (I never used eight). Microsoft is the only entity I’ve ever encountered that would remove usability, functionality, and features and then call it an “upgrade”.
Case in point: File manager traded menus for that awful “ribbon” interface and lost the drop down that allowed you to quickly select which app opens a file. Now you need a right click. Usability? Who needs that?
They added ads to Solitaire and took away the function that quickly ends a game.
They mangled the start menu.
But what’s worse, in Windows 7 they added something incredibly unintuitive and annoying, and made it a hard to change default, since they completely change the interface with every iteration: gestures. I’d forgotten bout them since I’d disabled them in the Acer a decade ago.
Gestures make lots of sense on a touchscreen, but not on a touchpad. I finally found the setting to shut them off, and the right mouse button stopped working. Fixing it was frustrating.
Getting on the network, finally, was no problem. Now to install all the programs I need. The computer refused to install programs, while showing me how to go to its unintuitive process for shutting that particularly annoying “feature” off. In fairness I do know folks for whom it would be essential.
Then I finally started paying attention to the hardware. There was no network jack, but doesn’t really need one with wi-fi, even if its wi-fi is old and weak. But it does have an HDMI jack, which I thought might solve a problem I had.
Disney launched its streaming service for seven bucks, and I wanted to see the beginning of Star Wars Episode 3 in 4K. It was awesome in the theater. So I signed up, since I had a smart 4K Sony TV. The trouble is, the app locks the TV up. Disney works fine on the tablet, but if I cast it to the TV the sound and picture are out of synch, and it isn’t 4K.
So I fired up Firefox, logged on to Disney+, and there are multi-second screen freezes. Chrome, Opera, and Edge all did the same thing. I don’t know if it’s a hardware or software problem.
While on the internet I discover that this is the first computer I remember owning that had no page up or down keys; rather, its page up/down keys move up and down one line. I also discovered that it had no LAN jack, which isn’t much of a hassle since it has wi-fi, even if the wi-fi is slow. However, using this computer to back up a terabyte of data from one network drive to another was a terrible idea; it’s been going for a full week and is only 91% complete.
There are also four USB ports and one new port I’d not seen before that probably isn’t very useful.
It does have a touch screen, making Windows 10 less awful, but not much less. It’s a convertible; the screen bends all the way around to the computer’s back, making it a tablet. However, unlike any other tablet, it has no way to automatically discern screen orientation. You have to tell it manually, which is a pain.
As I mentioned, it’s a replacement for the ten year old Acer. It has twice the processor speed, twice the memory (more memory than any computer I’ve owned) and half the drive space. I only use the drive for application and temporary files, since I have a 3 TB network drive, so that’s no problem.
But it boots no faster, apps load no faster, and Audacity is dog slow. It was ten times faster on the old one. At first I thought maybe the old computer was 32 bits and this is 64, and I got the idea that maybe I was running a 32 bit program on a 64 bit computer; none of my old 32 bit games will even install.
So I logged on to Audacity’s site and found the answer at https://www.audacityteam.org/download/windows/.
WINDOWS VERSION............RECOMMENDED RAM/PROCESSOR SPEED.MINIMUM RAM/PROCESSOR SPEED
Windows 10 (32- or 64-bit).4 GB / 2 GHz....................2 GB / 1 GHz
Windows 8 (64-bit)
Windows 7 (64-bit)
Windows 8 (32-bit)
Windows 7 (32-bit) (except Starter) 4 GB / 2 GHz............1 GB / 1 GHz
Windows 7 Starter ..................2 GB / 1 GHz............512 MB / 1 GHz
The Acer had Windows 7 starter with two gigabytes of RAM. So I installed the latest 64 bit version, and it was actually a little faster than the Acer.
In short, it isn’t a bad little computer as long as you’re running newer 64 bit programs, but on a scale of one to five, I give it a two. I wouldn’t recommend it.
A question: does anyone know how I can run those old 32 bit games on a 64 bit machine? It seems someone should have written an emulator.
I have become convinced.
There is no bottom.
There is no low that is too low. No ethical boundary that cannot be crossed. No crime that cannot be ignored. No profanity or taking the Lord's name in vain that cannot be hand waved away.
Trump really could parade naked in the streets, with hookers and drugs, shoot some or several random persons in the middle of the street in broad daylight . . .
and his band of FoxNews fed mouseketeers would just wave it away. Fake News! It didn't happen. We won't hear any witnesses. No evidence. Witch Hunt! Anyone who says it happened is a liar! I cannot recall! I would have to check my records. The trial judge is working closely with Trump's lawyers to fix this, so no worry.
The evangelicals cover their eyes or look the other direction. Justify and rationalize it by inches at a time.
Good is called evil and evil is called good.
We are all numbed to the bizarre and irrational. Reporters are afraid to report on the worst of Trump's behavior because it is so bad that they fear people will think they are biased against Trump merely for telling the simple facts. Because it sounds so bad that in normal times you would think the press is biased. Comedians make jokes about it, but it's not even funny any more. Just boring every day events.
Hear no evil, See no evil, Speak no evil.
People who don't like Java shouldn't use it. Use something more to your liking.
Java is not perfect (shocker!)
Java has warts from being designed in the early 90's and released later in the 90's. Computers and their limitations were different back then.
The Java runtime is a big disk footprint. At least if you use other languages, and don't realize what all you're getting in this fat package.
Java likes lots of memory.
Java programs start up slowly.
Java is not ideal for all programming tasks. (shocker! I can't write my bootloader or micro controller code in Java!)
Java (rather the JVM) does not have tail call optimization.
Java has Garbage Collection (GC). (Some people see this as a problem. If GC is a problem, you probably don't want Java, nor the JVM runtime system.)
Terminology clarification
From here on I'll try to use Java to mean a programming language that you write source code in, and compile it to JVM bytecode. I'll use JVM bytecode to mean the object code from compiled source languages, including the Java language. I'll use JVM to mean the Java Virtual Machine, that is the runtime system which executes JVM bytecode -- no matter what source language it was compiled from.
Virtues of Java / JVM -- Garbage Collection
Java and the JVM have Garbage Collection (GC) ! Free clue: all modern languages now have GC. Visual Basic. Visual FoxPro. JavaScript. Python. Arguably: Perl. C#. Erlang. Go. Lisp like languages. Prolog, Haskell and other higher order languages. And many others.
If GC is so horrible, why do so many languages have it? Some will say because programmers do not know how to manage memory. But that is not true. Speaking for myself, I wrote untold amounts of Pascal in the 80's, with complex data structures and understand quite well how to manage memory, avoid, detect and deal with memory leaks.
I would point out: Greenspun's tenth rule
Any sufficiently complicated C or Fortran program contains an ad-hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp.
(and that includes garbage collection along with other higher order programming idioms)
JVM GC is not comparable to other systems like Python or Node.js. Modern JVMs can run with Terabytes of memory and hundreds of cpu cores and have only 1 ms GC pause times. (Please call me when your Python or Node.js or Go can do that!)
Java offers multiple GCs to choose from. Each one has various tunable knobs and dials. Instrumentation (like VisualVM) can give you insight into the GC behavior of your large program that has many third party libraries so you can tune accordintly. (again, call me when your system can do that)
Red Hat's Shenandoah, and Oracle's ZGC are the current new state of the art GCs on Java. Both of these are open source in the latest Open JDK builds.
Multiple languages
Multiple languages compile to JVM bytecode. Not just Java. Kotlin. Scala. Clojure. And other languages run on the JVM (Groovy, Jython, even C).
Cross Platform
Java object code (JVM bytecode) is cross platform. I can take a desktop GUI program written in Java using Swing in 2004 on Windows, and run that object program on a Raspberry Pi (different OS) which did not even exist when the program was written. It runs perfectly.
Java programs, especially servers, which have no GUI are extremely cross platform.
The only pain points I can think of is (1) serial port communication, (2) doing extremely platform specific things (uh, say, accessing /proc or /sys). There are some nice cross platform solutions for serial communication; I had to use one a few years ago. I had to deal with whether to use names like /dev/ttyS1 or COM3:.
Compiled JVM bytecode runs on amazingly diverse platforms. From Blu Ray players to giant IBM Mainframes with seemingly strange architectures. Smart cards, car infotainment, single board Linux (eg, "Pi" type boards), and who knows what else.
Speed, yet dynamic access
The JVM runtime interprets JVM bytecode. It dynamically profiles every function to see how much CPU time it is getting. (How "hot" it is) Hot functions are immediately compiled (C1 compiler). C1 rapidly compiles the JVM bytecode into unoptimized native code. The function is added to a list to be compiled later by the C2 compiler.
Later, when the C2 compiler comes along, it spends significant time and effort recompiling that function into highly optimized native code.
C2 is one of, if not the most sophisticated compiler on the planet. The product of a couple decades of much research. It has only one source language to compile: JVM bytecode. It has multiple target instruction sets to compile to.
C2 compiles to the instruction set of the actual hardware it is running on. Something that an ahead of time C compiler, for example, cannot know in advance. C2 knows which instruction set extensions your actual processor has. Does your processor have SSE, MMX, ISSE instructions?
C2 also has global knowledge of the entire linked runtime program. Also something that a C compiler does not have advance knowledge about. C2 could know that a certain function could be called efficiently in two different ways from two other parts of the program, and compile two separate versions accordingly.
All method references in Java (JVM) are "virtual" (to use C++ terminology). But in practice many or most methods do not actually need to be virtual. C2 can (and does) prove that a method is never called in a way that it needs a vtable entry, and can compile efficiently accordingly. The programmer never needs to make decisions about whether functions should be virtual or not.
Research has shown that in many cases even when a virtual polymorphic function is called, from a specific call site, it often always calls the same concrete function at that call site. The new GraalVM takes advantage of this and cache which virtual function to call for next time. If at this particular call site (where function is called from) this time a different virtual method will be invoked, then a runtime error occurrs, is handled, the right virtual function computed and it is now cached.
C2 aggressively inlines code for performance. It is after speed not small code size. Memory is cheap. You can never get back time.
Now suppose that YOUR function A calls MY function B. When C2 compiles your function A, it may inline my function B inside the native code of your function to avoid function call overhead. Now suppose that the class which has my function B is dynamically reloaded. Oh no! Your function A now has a stale version of my function B inside of it! Not to worry, the JVM de-optimizes your function A back to being bytecode interpreted. If your function is still "hot" it will very soon get recompiled by C1 and then later by C2.
This "hotspot" and C1/C2 behavior is one reason why Java programs seem to "warm up". They start up slowly and then within a few minutes become very fast. If you have a program which needs to be restarted very infrequently, runs for a very long time between restarts, then this is for you! (example: long running servers) If you have a program that is rapidly and frequently started from the command line and needs to do something very quickly and exit, then this is definintely NOT for you!
When running a 64bit JVM with less than 32 GB of memory, JVM can do a pointer optimization trick. It can use 32-bit pointers instead of 64-bit pointers. All objects start on 8 byte boundaries (on x86/x64). So the low three bits of a 32-bit pointer are always zero. So why have them. Thus a 32-bit poiner can reference objects in 32 GB of memory. Next time you start the program with more than 32 GB of memory, it will have to use normal 64-bit pointers everywhere.
GC is the lubricant between different code libraries
In C or C++ there may be different memory management disciplines. Different calling conventions. Different ideas of responsibility about who "owns" something and is responsible to dispose of it. Even different allocators. Are there instances where glue code is needed to adapt the conventions of one code base with another that are both used in the same program?
An overlooked and maybe little known benefit of GC is that these problems go away. Everything uses one memory management discipline. Same calling conventions. A library written two decades ago can be passed data structures from another library that was only recently written.
GraalVM
This is so new I am not very familiar with it.
The JVM runtime is written in C++. Such a complex runtime, with GC, hotspot, C2/C2, native code interfaces, dynamic code reloading, etc is getting hard to maintain. Especially with multiple GCs to choose from. One of the things GraalVM does is let much more of the JVM be written in Java. Graal VM can also run code from LLVM, and other languages like R, Python, etc. So your C, Python and Java code could call functions within each other in the same runtime, and pass parameters transparently.
Concluding remarks
I know it is fashionable to hate Java. Yet Java is consistently year after year the number one language on various job sites and programming language surveys. Java is used by many major corporations. Red Hat, Oracle, SAP, IBM, Azul Systems and others see enough major players needing commercial support that they all seem to have a very tidy business with Java. Amazon and Microsoft Azure both bend over backwards to provide optimized Java runtime systems for these major customers with bucketloads of money. Microsoft recently partnered with Azul to provide their optimized runtine for free to Azure Java users. They did't do that for no reason.
Java must be doing something right. It is the best at what it does. There is nothing else that comes close to doing what I have described above.
Even if it is not right for you.
It's here to stay for a long time. Even if you hate it. But why hate it? Just don't use it.
If there were one perfect programming system for every use, we would all be using it already.