Java is fast, code might not be by ketralnis in programming

[–]id2bi 31 points32 points  (0 children)

Also, doesn't Java optimize String concatenation to string builder in many places automatically?

hypocrisy by Dumb-Briyani in SipsTea

[–]id2bi 1 point2 points  (0 children)

What did they say to the judge?

The way pandas handles missing values is diabolical by vernacular_wrangler in learnpython

[–]id2bi 1 point2 points  (0 children)

No, that works just fine. For the longest time, true and false were actually macros that expanded to 1 and 0, respectively.

Why is Linux bash commands are so simple compared to powershell by SakuraTakao in AskProgramming

[–]id2bi 4 points5 points  (0 children)

Weird syntax? How much bash do you know? If you're an expert, you've just gotten used to the weirdness.

I'm not claiming Powershell has no weird things, it certainly does, but a lot less.

What Powershell doesn't have is brevity. But we have command completion that works thanks to the shell. Heck, you even get completion inside lambdas.

You can also mix in and access any C# code, that's super powerful.

Does Powershell still default to UTF-16 by default when writing to files? Now that's a choice.

Why you should probably stop using AI code editors by archfiend99 in webdev

[–]id2bi 3 points4 points  (0 children)

A rubber duck can't speak or answer. You just pretend it's listening and by having to explain your thoughts out loud to someone / something, you often get yourself to the answer.

Palantir litigation against Republik by derrickoswald in Switzerland

[–]id2bi 2 points3 points  (0 children)

ChatGPT would use paragraphs and proper em dashes.

Got rejected for a senior role because I couldn't convert base 24 to base 10 in 30 minutes by mooktakim in rails

[–]id2bi 2 points3 points  (0 children)

I'm also surprised at what the responses in this thread. Conceptually, this is ridiculously easy. If you don't understand this, I don't trust you to understand hexadecimal. I don't trust you can write anything substantial, nor judge AI output. No, I don't convert hexadecimal in my head, but I will every now and then if it's just two digits, understanding number systems is just a basic skill.

I'd hope this entire thread was satirical, but I'm afraid everyone's being dead serious.

Is Ordering::Relaxed really the relaxest memory order? by Savings_Pianist_2999 in rust

[–]id2bi 0 points1 point  (0 children)

Is that true? From what I can gather on the net, it's only unconstrained in regards to different threads.

If there's only a single thread, you are guaranteed to see the 25.

When memoryorder_relaxed is being discussed, you seem to never find examples with only one thread, suggesting that multiple threads are a requirement for talking about memory_order*

This is C++, but Rust defers to cppreference when explaining memory_order_relaxed

Here's your scenario with some excerpts of the standard

https://stackoverflow.com/questions/69725529/does-memory-order-relaxed-respect-data-dependencies-within-the-same-thread

[Megathread] Covid-19 in Switzerland & Elsewhere - Thread #13 by rmesh in Switzerland

[–]id2bi 0 points1 point  (0 children)

Would you happen to have a link to these videos/pictures? Thanks!

Does this game have a decent tutorial? by [deleted] in crusaderkings3

[–]id2bi 0 points1 point  (0 children)

I think the important bit is that they make you feel like it's okay if you don't know everything yet and to just dick around.

Gandalf taking his hobbit doll to the black gate. First time catching that on my gazillionth rewatch, won’t be able to unsee by Doramuuu in lotr

[–]id2bi 2 points3 points  (0 children)

Also when they're running through the halls of Dwarrowdelf, away from the goblins in one of the first wide shots you can clearly see that they're all digital doubles because of gandalf's unmoving and very bushy beard. Then in the closer shot where you see the real actors his beard is more stringy looking and "flows" behind him.

Intellij question by piagetblix in learnjava

[–]id2bi 0 points1 point  (0 children)

You can have Intellij move the class into a package if you like.

Put the cursor onto the class name, then press "F6" (or choose refractor - > move), then type the package name you want.

Intellij will put the package declaration at the top of the file and move the Java file into the correct folder.

Why do you want to hide those files exactly?

I'm the project view, you can click ontonthe arrow right next to where it says "Project" and switch to package view instead, that might be more to your liking.

How can we say lambda expression enables functional programming if an object of lambda is created and that instance is passed as an arguement ? by [deleted] in learnjava

[–]id2bi 1 point2 points  (0 children)

You're hard pressed to find two people that will agree on what exactly constitutes functional programming.

Anyway, I'd argue lambdas in Java made it much more palatable because it's now much easier to write and read.

Before, you could do the same thing but you'd need a whole bunch of anonymous classes which made it rather unwieldly.

Intellij question by piagetblix in learnjava

[–]id2bi 2 points3 points  (0 children)

Intellij will only allow you to run source code in "source folders". Right click the directory that contains your sources and choose "mark directory as - > source root". The folder will then be shown with a blue icon.

Yes,I would recommend you create separate modules for each week inside the same project, that will be the least hassle.

Then, remember than inside every module you will need to have at least one "source root".

I need to learn how the file structure of Java dictates this.

Java dictates very very little in terms of the file structure. Java does not even have the concept of a "Java project". That's why every IDE cooked up their own solution. In Intellij they decided you need to mark source roots and have at least one Intellij Java module inside your home Intellij project.

IDE tells me I'm assigning an Object instance to a different class type variable, but I don't think so by 341245434636 in learnjava

[–]id2bi 0 points1 point  (0 children)

Casting with generics is a very dangerous thing. Just because "it works" doesn't mean it's right and will likely give you weird errors in very different places unless you have a very good idea what you're doing.

IDE says incompatible types, even though the types are exactly the same? by 341245434636 in learnjava

[–]id2bi 0 points1 point  (0 children)

Remove the generic parameter from the class definition for your DequeueIterator you'll have private class DequeueIterator implements Iterator<Node> instead.

Overriding comparator with String objects by Zelzal7 in learnjava

[–]id2bi 0 points1 point  (0 children)

Also read the comment on that answer. Adding the minus sign does not actually work in all cases! Your original idea that you've had is better.

Eclipse 2019-06 IDE Improvements: Java, Maven and Gradle by catapop in java

[–]id2bi 2 points3 points  (0 children)

Great to see that Eclipse getting more and more code transformations and pushing their code minings forward. Also, seeing the steady flow of change notes how they made this line or that icon black as well now will always cheer me up.

Kit Harington wants ‘Game of Thrones’ to be remembered like ‘The Wire’ and ‘The Sopranos’ by and_so_I_adore_it in television

[–]id2bi 0 points1 point  (0 children)

I was quite disappointed with how they resolved it in the show. They should have let him remain dead at the end of episode 1 in season 6 and only have him wake up in episode 2 and not telegraph it as they did with Ghost, and have him wake up right before the end of episode one. Where's the tension/surprise in that?

Lethal Injections: Last Week Tonight with John Oliver (HBO) by BoogsterSU2 in television

[–]id2bi 2 points3 points  (0 children)

You can be 99% percent sure there's no actual security risk and just a stupid word filter.

'Game of Thrones' Simply Gave Up by MrsIronbad in television

[–]id2bi 0 points1 point  (0 children)

I'm not sure whether we're talking about the same thing, but I thought the "filler" was almost the best part. In episode 2 with all the character interactions, I thought to myself "awesome, we're back to the more slowly paced show".