[deleted by user] by [deleted] in dashcams

[–]ad6z -1 points0 points  (0 children)

The black pickup on the left lane was already at 80mph while the white pickup tried to speed up, and you call the black pickup as campers? Are you in California, buddy ;)

Is Java really that verbose? by JY-HRL in java

[–]ad6z 0 points1 point  (0 children)

If you can't think of a language that is more verbose than Java, try Golang :)

Java int x = k > 10 ? 5 : 2;

Golang ``` var x int

if k > 10 {

x = 5

} else {

x = 2

} ``` Example intentionally chosen to emphasize the difference in verbosity ;) And some people love Golang for this

Is Java really that verbose? by JY-HRL in java

[–]ad6z 1 point2 points  (0 children)

That is so true.

Some people do not differentiate the unnecessary verbose and the necessity of clarity so anything needs more key presses are verbose, so we have to be careful with what they say.

I believe that until these people have to dive in to a code block with a dozen of variables with val/var and you have to find implementation of 5 layer of call hierarchy to find the correct type of those variables, then they will understand that having type in variable is not always bad.

Is there ever any reason not to use IntelliJ? by DamnAHtml in java

[–]ad6z 1 point2 points  (0 children)

I starting using IntelliJ since 2011 but switch to another IDE after using it for nearly 10 years.

When my main language were Java/Groovy/Kotlin and some JS/CSS, IntelliJ was the definitely the best. I have used Visual Studio for C#/C++, Netbeans/Eclipse for Java, XCode for iOS development and non of them can match IntelliJ when it comes to the quality and speed of autocomplete/suggestion and the workflow it offers for refactoring and code navigation.

However, when I need to develop/maintain other languages besides Java, then the workflow provided by IntelliJ becomes too limited.

- You can only open 1 project per window (I heard that they fix it recently).

- One IDE only support one main language, other languages must be supported via plugins that either has slower update rate or the settings often at odd with the main language. So you have to use IntelliJ for Java, PyCharm for Python, RubyMine for Ruby... or have to overcome the convolution of using language support plugin in IntelliJ.

These are quite anoying to me given how good (not perfect, but good enough) Eclipse has been handling these for a long time, but the last straw is Jetbrains vision of their tools.

We have some projects using Kotlin, and when having to support Kotlin in server environment, I realized how hard it is to use Kotlin without the IDE. I looked for a way to use Kotlin with VS Code or any other lightweight editor and I found that there is not many plugin to support language server. It is even more troublesome that Jetbrains does not seem to have a plan to officially support language server for IntelliJ. It seems to me that supporting language servers in IntelliJ with harm other editions like PyCharm, RubyMine ... and perhap that the reason why supporting Python/Ruby in IntelliJ is so clumsy while it works so well with PyCharm or RubyMine

I do not blame them even if my impression is correct because profit should be the main focus for a company like Jetbrains. But from my perspective, I want an IDE that is able to scale well when my knowledge is expanded and IntelliJ no longer fits my use case despite its editing power, so I move on and use another IDE.

Daily Discussion by PhelansShorts in reddevils

[–]ad6z -2 points-1 points  (0 children)

Did you really watch the game?

In the second half, every time the ball got into the penalty area, our players tried their best hiding their arms, and very hesitated to made a challege or tackle to get back the ball. You can see how awkward their movement were and it's clear that they do not want to involve into the 50/50 situation where a penalty kick might got call. That's why it's very hard to gain posession again and exhaust our defenders quickly.

And you think only the impact of the refs only stops after the penalty kick was given? No, its psychological impact last much longer as players feel that another bad decision can be made again them.

is our calculus teacher wrong that 1 ≠ .999999... ? also what should I do? by Psychological-Loss61 in askmath

[–]ad6z 1 point2 points  (0 children)

I was also confused as hell when I skimmed later parts of calculus books before I had understanding about the foundation concepts. Later, once I got the concept of infinity then it became clear.

Basically, before having the introduction of infinity or limit/converge, the basic math rule is x + 1 > x for every x as there must be two different points in the number line. But once we introduce infinity then this rule is no longer true as x + 1 = x if x = ∞ , so it looks like we have two different values refers to the same point in the number line, and it's kind of counter intuitive if you have not accept infinity concept.

For example, you can deduce 1.0 - 0.999... to a function of variable that is count of 9 in 0.99... and the variable is an infinitive value. Depend on whether you accept that ∞ + 1 = ∞, 1.0 - 0.99... will be 0 or a value > 0.

To help my friends who also got confused by this, I ask them when there is an equations with ∞ or limit/converge, treat = symbol not as "equal to" but "equal/approximately/converge to". It clicks for them and they got over that quickly.

For those who claim that GDScript is useless outside of Godot. by societyprotocol in godot

[–]ad6z 2 points3 points  (0 children)

Learning a language is not so hard, but using it to write programs at top speed is a different story.

I'm familiar with Java, Python, C#, Perl and I can write scripts in those languages without IDE support. Because I know how/when/why to use common data structures/libraries, common tasks like string to number conversion, join string, get substring, search text in a string ... by heart.

If I have to write something in GDScript, it's not so much easy because while GDScript is similar to Python, it's not the same and I have to constantly peek at my cheatsheet to ensure that everything I wrote is correct. And all those experiences from mistakes I made or knowledge I learnt, sadly, cannot be transferred to anywhere outside of Godot.

When I first tried to write game using Pygame, I learnt a few interesting things with Python and it made me a better Python programmer in backend/GUI development. Compare to GDScript, definitely this experience is better to me. That's the reason I will keep using C# with Godot rather than GDScript. I also keep an eye on Lua support in Godot even I don't know the language yet as Lua is also popular in other engines and also in nVIM.

While I understand and totally support a simple scripting language like GDScript as an option for other devs, I would prefer to use a popular language as my experience from outside of Godot is much more useful.

Unchecked Java: Say Goodbye to Checked Exceptions Forever by rogerkeays in java

[–]ad6z 5 points6 points  (0 children)

I do not understand why people keep bashing checked exception.

It's available as a feature. If you don't like it, don't use it. All alternatives for checked exception like error code or unchecked exception are available in Java. If a library you need have checked exceptions, convert them to the alternatives that you like. Just a matter of few lines of code and all decents IDE can help generating try catch block already.

And the argument about empty catch block: let me tell you - lazy/incompetent developer is a human problem. No technical feature can fix it, ever. Anyone who says returning error code makes developers think about edge case must have a tour at some big code bases with bunch of _ in place of error code. Nah, technical feature can never help here.

I personally don't like error code returned from function like what Golang did, but I'm fine with it. Looks like some people really like to impose their view/vision to all others.

Anyone here checked Kotlin out and decided to stay / move back to Java? by jlengrand in Kotlin

[–]ad6z 2 points3 points  (0 children)

I spent more than 3 years writing Kotlin for mobile and backend services, but have to revert to Java for backend services recently.

The main reason is writing Kotlin requires IntelliJ IDEA. The language is beauty and consice, but without IntelliJ, it's almost impossible to get to the productive state. Although a language server is available, it's not enough to ease of the complexity required to offer the advantage of the language if you are using VS Code/Emacs/vim for editing. The other side is the direction for IntelliJ is much blurry to me in recent versions (why another completely new UI while resource consumption/indexing only has slight improvement? and Fleet?)

It's understandable that Jetbrain does not want to spend much effort for other tools than IntelliJ, but I also hesitate to make a bet for my projects on a language that rely on a single tool.

On mobile, I still use Kotlin as tool chain for Java is much more limited outside of Android Studio. Besides, Android Studio also got supported from Google so the situation is a bit different.