Tagir Valeev's Avatar

Tagir Valeev

@tagir-valeev.bsky.social

Work at JetBrains. Java Champion. Check my Java book: https://mng.bz/671p

373 Followers  |  29 Following  |  76 Posts  |  Joined: 24.01.2025
Posts Following

Posts by Tagir Valeev (@tagir-valeev.bsky.social)

Preview
Angebot: Ein Tag in der Welt der Softwareentwicklung MΓΌnchen | 23. April 2026, 10:00 | JetBrains GmbH, MΓΌnchen mit Ekaterina Popova

Girls’ Day at the JetBrains office in Munich, Apr 23rd. The registration is open here: www.girls-day.de/.oO/Show/jet...

23.02.2026 16:27 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Glean answer:

In building ... today’s siren is just a scheduled test and you do not need to leave
your workplace while it's running.

If you're unsure or something seems off (e.g. smoke, smell, people evacuating), call Munich building emergency number ... or ask at reception immediately.

Glean answer: In building ... today’s siren is just a scheduled test and you do not need to leave your workplace while it's running. If you're unsure or something seems off (e.g. smoke, smell, people evacuating), call Munich building emergency number ... or ask at reception immediately.

We have AI assistant Glean integrated into the Slack, and it answered privately to her: "today's siren is just a scheduled test and you do not need to leave your workplace". It was not a test or a drill, it was a real fire alarm. Someday, AI will kill us.

12.02.2026 10:52 β€” πŸ‘ 87    πŸ” 33    πŸ’¬ 3    πŸ“Œ 5
Image of fire brigade near our office

Image of fire brigade near our office

Today we had a fire alarm in the office. A colleague wrote to a Slack channel 'Fire alarm in the office building', to start a thread if somebody knows any details.

12.02.2026 10:52 β€” πŸ‘ 25    πŸ” 5    πŸ’¬ 2    πŸ“Œ 1

Just seen on a code review:

> .groupBy({ it.second }, { it.first })

People may think it's short and concise. I think, it's cryptic and unreadable. You have to go several lines above and find `to` inside one of previous lambdas to finally understand what is `it.first` and what is `it.second`.

21.01.2026 10:43 β€” πŸ‘ 4    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
import kotlin.system.measureTimeMillis

fun main() {
    val set = (0..10000000).toCollection(linkedSetOf())
    repeat(5) {
        val time1 = measureTimeMillis { set.last }
        println("set.last call took $time1 ms")
        val time2 = measureTimeMillis { set.last() }
        println("set.last() call took $time2 ms")
    }
}

import kotlin.system.measureTimeMillis fun main() { val set = (0..10000000).toCollection(linkedSetOf()) repeat(5) { val time1 = measureTimeMillis { set.last } println("set.last call took $time1 ms") val time2 = measureTimeMillis { set.last() } println("set.last() call took $time2 ms") } }

set.last call took 1 ms
set.last() call took 71 ms
set.last call took 0 ms
set.last() call took 63 ms
set.last call took 0 ms
set.last() call took 58 ms
set.last call took 0 ms
set.last() call took 61 ms
set.last call took 0 ms
set.last() call took 57 ms

set.last call took 1 ms set.last() call took 71 ms set.last call took 0 ms set.last() call took 63 ms set.last call took 0 ms set.last() call took 58 ms set.last call took 0 ms set.last() call took 61 ms set.last call took 0 ms set.last() call took 57 ms

Fun with #Kotlin: a pair of parentheses may cost you a lot!

07.01.2026 10:11 β€” πŸ‘ 4    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0

In today crazy #Java series: this code works (with Java 25):

<T extends Integer> void test(T t) {
t++;
//t+=1;
IO.println(t);
}

void main() {
test(10);
}

But if you replace t++ with t+=1, it stops working!
Main.​java:3: error: incompatible types: int cannot be converted to T

17.12.2025 10:33 β€” πŸ‘ 11    πŸ” 1    πŸ’¬ 1    πŸ“Œ 0
Preview
Nullability, JSpecify, and IntelliJ with Andrei Kogun and Tagir Valeev YouTube video by Coffee + Software

Had a talk about JSpecify and IntelliJ IDEA on Coffee + Software channel www.youtube.com/live/K9QIYZM...

12.12.2025 17:50 β€” πŸ‘ 3    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0
Post image

Nice commit github.com/stack-auth/s...

10.12.2025 17:24 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Preview
What's New in IntelliJ IDEA 2025.3 Explore IntelliJ IDEA's latest features and updates to elevate your professional Java and Kotlin development experience.

The IntelliJ IDEA 2025.3 release has landed!

This version brings several significant updates, all of which are described and demoed on our What’s New page.

Check it out! πŸ‘‡

08.12.2025 13:56 β€” πŸ‘ 48    πŸ” 12    πŸ’¬ 4    πŸ“Œ 2

Think positive. You have a good chance now to become the longest living person in your town or even state. You can also compete in a local running event in the M75 age category with good chances to win!

21.11.2025 17:17 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

I don't know what is sadder: AI that thinks up the things in the absence of reliable information, or people who blindly trust it without checking the sources (there aren't any).

21.11.2025 17:10 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

The funny thing is that a person today tried to convince me that this is true. While I don't know your real age, I was like 'huh? Can't be true'. He showed the Google search result as a proof.

21.11.2025 17:09 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Post image

@briangoetz.bsky.social are you really this old? 😱

21.11.2025 15:30 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 2    πŸ“Œ 0

Will you expect this code to be JSpecify-compliant? If not, then how to fix it?

@NullMarked
public final class Demo {
List<String> removeNulls(List<@Nullable String> input) {
return input
.stream().filter(Objects::nonNull).toList();
}
}

18.11.2025 13:40 β€” πŸ‘ 0    πŸ” 1    πŸ’¬ 1    πŸ“Œ 0

You can find the discussion here: youtrack.jetbrains.com/issue/IDEA-3...

13.11.2025 05:52 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Preview
Null-Safe applications with Spring Boot 4 Level up your Java code and explore what Spring can do for you.

Don't miss my new blog post in the Road to GA series to learn how the Spring team empowers Spring developers to make their Spring Boot 4 application null-safe, to reduce or remove the risk of NullPointerException and to solve "the billion dollar mistake"! spring.io/blog/2025/11...

#spring #java

12.11.2025 17:09 β€” πŸ‘ 41    πŸ” 22    πŸ’¬ 0    πŸ“Œ 1

Oh, we had this in my previous job! I can tell you what can go wrong: the limited size of the class constant pool! We actually started hitting it when tried to add more stuff into that huge Utils class.

12.11.2025 13:04 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 2    πŸ“Œ 0
Post image

A user reports wrong highlighting in IntelliJ IDEA: the code is red, but both javac compiler and ecj compiler compile the code successfully, using any version of compiler. Next you read the spec and realize that IntelliJ IDEA behavior is correct, and both compilers are wrong. Weird feeling.

12.11.2025 13:03 β€” πŸ‘ 10    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Days since I mixed 'ExpressionUtils' and 'ExceptionUtils': 0

03.11.2025 17:09 β€” πŸ‘ 4    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Post image Post image

Is it official now to call the taskbar notification area as 'tray'? I remember Raymond Chen saying that this is wrong πŸ€” devblogs.microsoft.com/oldnewthing/...

09.10.2025 08:36 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Fixed a static analysis warning in a Java file in the repo
.
.
.
It was a demonstration Java file used to onboard users and teach them about IntelliJ IDEA inspections and quick-fixes. The warning was there to illustrate how inspections work 🀦

08.10.2025 14:51 β€” πŸ‘ 4    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image Post image

TIL: In #Java, List.subList() and List.reversed() are implemented smartly. You may call these methods as many times as you want and in any order, but you don't get a long chain of references which leads to StackOverflowError. The longest chain of views is two: reversed -> subList -> original list.

27.09.2025 11:49 β€” πŸ‘ 12    πŸ” 5    πŸ’¬ 0    πŸ“Œ 0

Implemented Comparator.min/max for the Java standard library. Should be available since Java 26.
❌comp​.compare(a, b) >= 0 ? a : b
βœ…comp.max(a, b)
bugs.openjdk.org/browse/JDK-8...

19.09.2025 08:38 β€” πŸ‘ 9    πŸ” 2    πŸ’¬ 0    πŸ“Œ 0
Java 25 / JDK 25: General Availability

Java 25 / JDK 25: General Availability: mail.openjdk.org/pipermail/jd...

Features: openjdk.org/projects/jdk...

Downloads: jdk.java.net/25/

#Java25 #JDK25 #OpenJDK #Java

16.09.2025 13:26 β€” πŸ‘ 81    πŸ” 52    πŸ’¬ 0    πŸ“Œ 3
Preview
Java 25 LTS and IntelliJ IDEA | The IntelliJ IDEA Blog Full support for Java 25 is available in IntelliJ IDEA!

Java 25 LTS is here! πŸš€ Ready to tap into the latest #Java features? #IntelliJIDEA supports Java 25 from day one. Let’s dive into what’s new and how your IDE has you covered! πŸ‘‡ #Java25IntelliJIDEA jb.gg/r70wns

16.09.2025 15:01 β€” πŸ‘ 38    πŸ” 16    πŸ’¬ 0    πŸ“Œ 1
Post image Post image Post image

JetBrains AI Assistant is quite useful for adding Maven dependencies. Take care, though, to update the versions to the latest, as its learning set is somewhat outdated. To update the version, invoke good old code completion.

16.09.2025 13:57 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
JDK 25

Looks like today is the day for JDK25!

openjdk.org/projects/jdk...

#java

16.09.2025 10:14 β€” πŸ‘ 18    πŸ” 6    πŸ’¬ 1    πŸ“Œ 0
Post image

Yesterday during dinner with Javazone speakers, I asked JetBrains Kineto to create an app to check whether a number is prime and show factors if it's not. It took a single prompt and about 30 minutes. It deploys the app automatically. Now I have my very own prime checker 😁

05.09.2025 09:02 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Haven't seen him.

04.09.2025 21:39 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image

Josh's talk was actually very hot πŸ”₯ #JavaZone

04.09.2025 08:50 β€” πŸ‘ 7    πŸ” 1    πŸ’¬ 3    πŸ“Œ 0