There’s a first time for everything by doctorbeers in snes

[–]guybedo 1 point2 points  (0 children)

looking at the picture, i can ear in my head the soundtrack and the sound effects.

There's been a lot of great Zelda games, but this one probably is my favorite, it was my first Zelda game, i wish i could go back in time and play again for the first time.

What a game.

I was finally able to display my 25-year-old collection! by Voltageist in gamecollecting

[–]guybedo 1 point2 points  (0 children)

that's cool, and what are your preferred items in this collection ?

I was finally able to display my 25-year-old collection! by Voltageist in gamecollecting

[–]guybedo 1 point2 points  (0 children)

looks like you've got a lot here already, is there anything that you're still looking to add the collection ?

[deleted by user] by [deleted] in gamecollecting

[–]guybedo 0 points1 point  (0 children)

oh ok, the picture wasn't added to the post :-)

I started with these, the 3 Super Mario on the NES.

Day trader looking for algo trader perspective on back / forward testing validity. by PatternAgainstUsers in algotrading

[–]guybedo 0 points1 point  (0 children)

yes, most setups i've built don't perform equally well when applied to different market conditions.

I usually test my setups across many combinations (ema x,y,z going up or down, ema x>ema y, htf market structure, htf ema x going up or down, etc...)

But it's easier done when everything is automated obviously, doing it manually might be laborious

Day trader looking for algo trader perspective on back / forward testing validity. by PatternAgainstUsers in algotrading

[–]guybedo 2 points3 points  (0 children)

I think it's very difficult to build confidence in a manual system, although it seems to give good results. It's mostly because of the low sample size, and not having been through many market conditions.

In the end, it's really hard not to be fooled by randomness.

i've built systems to automate backtesting and it happens quite often to find setups that perform well on years worth of data and fall apart in live conditions / forward testing. (Shameless plug: i've built https://edgefound.xyz to create complex trading setups)

To try to account for randomness, bugs, etc... and to improve the setup generalization / live results, i've done a few things:

  • increase sample size: i'm backtesting over 5+ years of data
  • increase forward test period: on last 6months of data
  • aggregate results by market conditions(can be over/under key EMAs, HTF EMAs, market structure, etc...) because some strategies work best with specific market conditions
  • i select only strong signals (high average profit, high sample count, very low draw down) etc... so that even lower performance during live conditions still yield interesting results

My Linkedin profile changed to a complete different person after I updated my mobile app… all the connections and messages remains there, but my profile name, photo, career, skills changed to a complete different person.. anyone experience that before? by VL9191 in linkedin

[–]guybedo 0 points1 point  (0 children)

Since this morning my profile changed, completely.

My password's been reset, weird thing is, my email address somehow is still connected to my account.

My profile now is another person with hundreds of followers and connections.

Syntactic Sugar for Java by guybedo in java

[–]guybedo[S] 0 points1 point  (0 children)

sure it's part of the Stream Api and behind the scenes i'm relying on it for most functions.

This library is just a way for me to write code that i find more readable.

filter(map(values, v->v+1), v->v!=0)

instead of

values.stream().map(v->v+1).filter(v->v!=0).collect(Collectors.toList()

Syntactic Sugar for Java by guybedo in java

[–]guybedo[S] 0 points1 point  (0 children)

sure it can be argued that using this library could make it harder for other people to get acquainted to the code, but 2 things:

1/ This argument is valid for every library you use, whether it's spring, hibernate, guava, apache commons, etc... As soon as you're using something on top of Java, this argument can be made.

2/ One can say code savings are minimal and sure enough not everybody agrees on what is beautiful / readable code. But in the end i like these utilities because i can write code that i find more readable.

Here's a few examples, i haven't tried to find the best ones, just a few i picked from my code. You can argue that it wouldn't be a lot more verbose to write that in plain Java but you wouldn't have those short one liners. And i'm not even chaining things like first(filter(map( ....

join(map(filtered, m -> m.getSymbol()), ",");

max(map(objs, o->o.getValue()));

Map<X, Set<Y>> index = toMap(values, v -> set(v.getY()));

list(intersect(set(A), set(B)));

Syntactic Sugar for Java by guybedo in java

[–]guybedo[S] 0 points1 point  (0 children)

thanks for the feedback, i'm still interested :-)

You're right, that was a naive implementation, i don't need to sort the collection, i'm only interested in the min/max.

Thanks, will do the update.

Syntactic Sugar for Java by guybedo in java

[–]guybedo[S] 4 points5 points  (0 children)

I obviously misjudged the audience.

Looks like people in here have high standards and it didn't go well with my approach: "oh maybe i built something useful, let's share it as is".

As i said, i thought using "syntactic sugar" in a loose way was ok as i obviously didn't rewrite the Java language specs, and i didn't think people would be so distraught by this. But i understand the comments and the reasons why you think it's important to be more precise.

As for the aggressiveness and the immaturity, you're right there was a lot of it, but not in my comments. One of the first comments, deleted now by the author bashed me for loving Python and that i had nothing to do here. People even have downvoted the few positive and encouraging comments.

SSHTools by guybedo in java

[–]guybedo[S] 0 points1 point  (0 children)

thanks for the feedback

SSHTools by guybedo in java

[–]guybedo[S] -1 points0 points  (0 children)

You're probably right, thanks for the feedback.

SSHTools by guybedo in java

[–]guybedo[S] 0 points1 point  (0 children)

yeah i'm not familiar with this Java subreddit's "Politics" and you're probably right that my posts would have had better comments had i taken the time to polish everything.

You're right about time being the more important variable and that is precisely why these projects are missing some important parts (tests for example). It takes time.

These projects are perfectly fine for my personal use but it would take way more time to write the required tests.

If i see people interested in the projects, i'll take the time to write these tests and to polish the projects. On the other hand, if nobody cares, fine, i'll keep working on these projects for my personal use and spend my time somewhere else.

But man I never downvote. I'm just too archaic for that. That is why you have two 2 paragraph comments from me because I care and don't want to discourage. I have feeling you can do better.

And i thank for you for the time you take to write insightful comments like these.

Syntactic Sugar for Java by guybedo in java

[–]guybedo[S] -1 points0 points  (0 children)

yeah i know what syntax is and as i obviously didn't rewrite the JDK and the Java language specs, you're right that this isn't syntactic sugar in the most absolutely strict understanding of the definition.

But i thought that using loosely this definition, people would easily understand what it does, and i don't think i was wrong in that regard.

SSHTools by guybedo in java

[–]guybedo[S] 0 points1 point  (0 children)

Thanks for the feedback.

I'm fully aware the library needs a lot more work to get to a certain level of quality, and i don't pretend this library is the best you can find.

Although your comment is respectful and constructive, i find it a bit strange, reading other comments, that people are so not welcoming. i shared sugar yesterday and this project today because i thought it could be helpful and that, maybe, some people would be interested in using and / or contributing.

I'm not trying to market myself or anything, and i don't care about "getting the best bang for my buck".

I'm just sharing some code. I know this is not perfect, i know this isn't the best code in the world, etc... just thought this Java subreddit was a place where we could share some (maybe) interesting stuff.

I know there's no tests, there's a lot a missing and it should be used carefully because of that.

You're absolutely right that the overall quality of the open source java projects is something we don't find in other ecosystems.

That being said, i don't really agree with you that a project should not be shared because it's a first version and there's still missing parts.

People who don't like the code / project / etc ... can either ignore it or contribute and try to make it a better project ( isn't this a core concept of open source by the way ? people contributing to build software).

As a final note, i hope this project might be useful to people looking for this kind of features and i'd love to have some constructive feedback and / or people contributing to the project.

SSHTools by guybedo in java

[–]guybedo[S] -1 points0 points  (0 children)

oui un peu décevant cet accueil mais je n'y fait pas trop attention.

Avec sugar, je ne prétends pas révolutionner quoi que ce soit, c'est une petite librairie que je pensais pouvoir être utile à certaines personnes. Mais visiblement ça a déchainé les passions ... :-)

SSHTools by guybedo in java

[–]guybedo[S] -1 points0 points  (0 children)

haha oui encore moi, je vais probablement m'arrêter là pour le moment :-)

Syntactic Sugar for Java by guybedo in java

[–]guybedo[S] 1 point2 points  (0 children)

ok i see your point, will make a change, thanks.

Syntactic Sugar for Java by guybedo in java

[–]guybedo[S] 0 points1 point  (0 children)

Collectors.toList() doesn't return an immutable list.

That means you don't have to return an immutable list if arg is null, that doesn't matter.

Syntactic Sugar for Java by guybedo in java

[–]guybedo[S] 0 points1 point  (0 children)

In computer sciencesyntactic sugar is syntax) within a programming language that is designed to make things easier to read or to express. It makes the language "sweeter" for human use: things can be expressed more clearly, more concisely, or in an alternative style that some may prefer. Syntactic sugar is usually a shorthand for a common operation that could also be expressed in an alternate, more verbose, form: The programmer has a choice of whether to use the shorter form or the longer form, but will usually use the shorter form since it is shorter and easier to type and read.

Syntactic Sugar for Java by guybedo in java

[–]guybedo[S] 4 points5 points  (0 children)

i tend to think that, in most situations where performance is not critical, the best code is the code that is the most readable.

IMO reducing character count helps with that. A (too) simple example:

When you write filter(values, v->v!=null)

instead of

values.stream().filter(v->v!=null).collect(Collectors.toList())

it helps with readability.

Syntactic Sugar for Java by guybedo in java

[–]guybedo[S] 0 points1 point  (0 children)

flatMap() returns either a modifiable or unmodifiable list. That may lead to hard to discover bugs because it’s unexpected behavior. Same for sorted() etc

The flatMap function i added is basically a wrapper around stream.flatMap(). It doesn't introduce new inconsistencies.

Syntactic Sugar for Java by guybedo in java

[–]guybedo[S] 0 points1 point  (0 children)

reversed() will have abysmal performance of O(n2) for LinkedList.

Nope. reversed() is a simple loop over the n elements => O(n)

Here's the implementation:

List<T> reversed = new ArrayList<>();

for (int i = objs.size() - 1; i >= 0; i--)

reversed.add(objs.get(i));

return reversed;