Dmitri Vasko
@dmitriv
Leader · Member since Oct 2017
Moderator. Java, JVM tuning, concurrency.
0 followers · 0 following
Badges and trust level are earned across the whole community.
- Topics created
- 1
- Posts created
- 6
- Likes given
- 29
- Likes received
- 39
- Days visited
- 0
- Solutions
- 3
Days visited count across the whole community, not just this forum.
Most active topics
Most liked posts
- Java: concurrent modification exception when removing from a list in a for-each loop
for (String s : names) { if (s.isBlank()) names.remove(s); } throws ConcurrentModificationException. How should I remove while iterating?
9 likes
- SQL: get the latest row per group
In Postgres the shortest form is DISTINCT ON: SELECT DISTINCT ON (customer_id) * FROM orders ORDER BY customer_id, created_at DESC; Portable SQL uses a window f
9 likes
- PostgreSQL: query is slow even though the column is indexed
Wrapping the column in a function (date(created_at)) means the index on created_at cannot be used — the planner would have to compute date() for every row. Rewr
9 likes
- How do I select rows from a pandas DataFrame based on column values?
query also accepts local variables with @: orders.query('total > @threshold').
5 likes
- C#: async void vs async Task
Only for event handlers. Exceptions from async void cannot be caught by the caller and crash the process; use async Task everywhere else.
4 likes
Top categories
Top tags
- #collections 1
- #iterator 1
- #java 1
Recent badges
- Spark: how to avoid a shuffle when joining a small table?
Joining a 2 GB fact table with a 5 MB lookup table causes a full shuffle. Any way to avoid it?
Likes given · 10/12/2026
- Floating point: why is 0.1 + 0.2 != 0.3?
0.1 + 0.2 === 0.3 is false in JavaScript. Is the language broken?
Likes given · 10/12/2026
- Async Python: run blocking code without freezing the event loop
I call a blocking library function inside an async def handler and the whole server stalls. How do I run it without blocking?
Likes given · 10/12/2026
- Java: concurrent modification exception when removing from a list in a for-each loop
Liked by Svetlana Orlova
for (String s : names) { if (s.isBlank()) names.remove(s); } throws ConcurrentModificationException. How should I remove while iterating?
Likes received · 10/12/2026
- SQL: get the latest row per group
For each customer_id I need the most recent order from orders(id, customer_id, created_at, total).
Likes given · 10/12/2026
- TypeScript: type an object whose keys come from a union
I have type Theme = 'light' | 'dark' and want an object that must contain a colour for every theme. How do I type it?
Likes given · 10/12/2026
- Go: all goroutines are asleep — deadlock! with an unbuffered channel
func main() { ch := make(chan int) ch <- 1 fmt.Println(<-ch) } Why does this deadlock?
Likes given · 10/12/2026
- JavaScript: why does [1, 2, 10].sort() put 10 before 2?
[1, 2, 10].sort() // [1, 10, 2] Is this a bug?
Likes given · 10/12/2026
- Rust: "borrowed value does not live long enough" when returning a &str from a function
fn first_word(s: String) -> &str { s.split(' ').next().unwrap() } The compiler says the borrowed value does not live long enough. I just want the first word
Likes given · 10/12/2026
- PostgreSQL: query is slow even though the column is indexed
This query takes ~4 s on a 30M-row table even though created_at has a B-tree index: SELECT * FROM events WHERE date(created_at) = '2026-10-01'; EXPLAIN shows a
Likes given · 10/12/2026
- Git: undo the most recent local commits
I committed the wrong files and have not pushed yet. How do I undo the last commit but keep my changes?
Likes given · 10/12/2026
- How do I select rows from a pandas DataFrame based on column values?
I have a DataFrame of orders and want only the rows where status is "shipped" and total is above 100. In SQL: SELECT * FROM orders WHERE status = 'shipped' AND
Likes given · 10/12/2026
- Why does iterating a sorted list run faster than an unsorted one in this C++ loop?
I have a loop that sums every element of a large std::vector<int> that is at least 128. If I sort the vector first (outside the timed region), the loop runs abo
Likes given · 10/12/2026
- C#: async void vs async Task
Liked by Hollis Grant
Only for event handlers. Exceptions from async void cannot be caught by the caller and crash the process; use async Task everywhere else.
Likes received · 10/12/2026
- C#: async void vs async Task
Liked by Svetlana Orlova
Only for event handlers. Exceptions from async void cannot be caught by the caller and crash the process; use async Task everywhere else.
Likes received · 10/12/2026
- C#: async void vs async Task
Liked by Amara Nwosu
Only for event handlers. Exceptions from async void cannot be caught by the caller and crash the process; use async Task everywhere else.
Likes received · 10/12/2026
- C#: async void vs async Task
Liked by Tomás Ferreira
Only for event handlers. Exceptions from async void cannot be caught by the caller and crash the process; use async Task everywhere else.
Likes received · 10/12/2026
- Spark: how to avoid a shuffle when joining a small table?
Broadcast the small side: from pyspark.sql.functions import broadcast facts.join(broadcast(lookup), "country_code") Spark also does this automatically below spa
Likes given · 10/12/2026
- Floating point: why is 0.1 + 0.2 != 0.3?
No — 0.1 and 0.2 have no exact binary representation, so the sum is 0.30000000000000004. Compare with a tolerance: Math.abs(a - b) < Number.EPSILON and use inte
Likes given · 10/12/2026
- Async Python: run blocking code without freezing the event loop
Push it to a thread: result = await asyncio.to_thread(blocking_fn, arg) For CPU-heavy work use a process pool with loop.run_in_executor(ProcessPoolExecutor(), f
Likes given · 10/12/2026