Ever wondered how the JVM debugger 'Evaluate' feature works in IDEs? Long ago I thought that the Java debug interface (JDI) actually allows you to specify the expression and get back its value.

However, this is not quite possible: there's no Java language compiler inside the JVM. When the process is paused JDI allows you to read or write any variables and fields or even execute an existing method with given arguments. But nothing like addition or multiplication.
On the other hand, #IntelliJIDEA debugger allows you to evaluate even statements! You can write there `for`, `if`, `while`, `switch` - whatever. You can even declare local variables. So how this works?
The answer is simple: IDEA debugger has a built-in interpreter for Java! If you access an existing variable or a field, call a method or instantiate an object, it queries JDI. Otherwise, IDE itself does all the calculations.
The amusing thing is that debugger authors didn't bother to make it as strict as Java itself, so the language inside the interpreter is a much more permissive version of Java. For example, you don't need to initialize variables there! Default values like 0 are used automatically.
Of course, final variables could be changed. Why artificial limitations?
Another thing: most of the casts are not necessary. This interpreted Java more resembles dynamically typed languages like JavaScript. Duck-typing works: if there's a method, we can call it. Even if the highlighter complains.
Switch statements and expressions are more permissive there: you can switch over any type. Also, no default is necessary for switch expressions. If it's not visited, the evaluation will be successful.
In addition to use any type, you can use any expressions as case labels, not just constants! The first matching branch will be executed.
Finally, even if your project still uses Java 6 JDK, it doesn't stop you from using new language features. For example, 'var' declarations and patterns in instanceof work perfectly, because they are interpreted by IDE, not by your JDK. Just ignore error messages!

More from Tech

"I really want to break into Product Management"

make products.

"If only someone would tell me how I can get a startup to notice me."

Make Products.

"I guess it's impossible and I'll never break into the industry."

MAKE PRODUCTS.

Courtesy of @edbrisson's wonderful thread on breaking into comics –
https://t.co/TgNblNSCBj – here is why the same applies to Product Management, too.


There is no better way of learning the craft of product, or proving your potential to employers, than just doing it.

You do not need anybody's permission. We don't have diplomas, nor doctorates. We can barely agree on a single standard of what a Product Manager is supposed to do.

But – there is at least one blindingly obvious industry consensus – a Product Manager makes Products.

And they don't need to be kept at the exact right temperature, given endless resource, or carefully protected in order to do this.

They find their own way.
1. One of the best changes in recent years is the GOP abandoning libertarianism. Here's GOP Rep. Greg Steube: “I do think there is an appetite amongst Republicans, if the Dems wanted to try to break up Big Tech, I think there is support for that."

2. And @RepKenBuck, who offered a thoughtful Third Way report on antitrust law in 2020, weighed in quite reasonably on Biden antitrust frameworks.

3. I believe this change is sincere because it's so pervasive and beginning to result in real policy changes. Example: The North Dakota GOP is taking on Apple's app store.


4. And yet there's a problem. The GOP establishment is still pro-big tech. Trump, despite some of his instincts, appointed pro-monopoly antitrust enforcers. Antitrust chief Makan Delrahim helped big tech, and the antitrust case happened bc he was recused.

5. At the other sleepy antitrust agency, the Federal Trade Commission, Trump appointed commissioners
@FTCPhillips and @CSWilsonFTC are both pro-monopoly. Both voted *against* the antitrust case on FB. That case was 3-2, with a GOP Chair and 2 Dems teaming up against 2 Rs.
THREAD: How is it possible to train a well-performing, advanced Computer Vision model 𝗼𝗻 𝘁𝗵𝗲 𝗖𝗣𝗨? 🤔

At the heart of this lies the most important technique in modern deep learning - transfer learning.

Let's analyze how it


2/ For starters, let's look at what a neural network (NN for short) does.

An NN is like a stack of pancakes, with computation flowing up when we make predictions.

How does it all work?


3/ We show an image to our model.

An image is a collection of pixels. Each pixel is just a bunch of numbers describing its color.

Here is what it might look like for a black and white image


4/ The picture goes into the layer at the bottom.

Each layer performs computation on the image, transforming it and passing it upwards.


5/ By the time the image reaches the uppermost layer, it has been transformed to the point that it now consists of two numbers only.

The outputs of a layer are called activations, and the outputs of the last layer have a special meaning... they are the predictions!

You May Also Like

I hate when I learn something new (to me) & stunning about the Jeff Epstein network (h/t MoodyKnowsNada.)

Where to begin?

So our new Secretary of State Anthony Blinken's stepfather, Samuel Pisar, was "longtime lawyer and confidant of...Robert Maxwell," Ghislaine Maxwell's Dad.


"Pisar was one of the last people to speak to Maxwell, by phone, probably an hour before the chairman of Mirror Group Newspapers fell off his luxury yacht the Lady Ghislaine on 5 November, 1991."
https://t.co/DAEgchNyTP


OK, so that's just a coincidence. Moving on, Anthony Blinken "attended the prestigious Dalton School in New York City"...wait, what? https://t.co/DnE6AvHmJg

Dalton School...Dalton School...rings a

Oh that's right.

The dad of the U.S. Attorney General under both George W. Bush & Donald Trump, William Barr, was headmaster of the Dalton School.

Donald Barr was also quite a


I'm not going to even mention that Blinken's stepdad Sam Pisar's name was in Epstein's "black book."

Lots of names in that book. I mean, for example, Cuomo, Trump, Clinton, Prince Andrew, Bill Cosby, Woody Allen - all in that book, and their reputations are spotless.