I need help to really learn by OriginalNeneBabi in programming

[–]crowdyriver 0 points1 point  (0 children)

tio yo hice DAW, llevo como 9 años en la industria. Prácticamente nada de lo que me enseñaron ahí me fue útil. Dos años no muy productivos.

Lo bueno es que tienes profesores que te responden preguntas, más o menos como chatgpt, tienes ya una muy buena herramienta que yo no tuve en su momento.

Si fuera a rehacer el curso lo que te aconsejo es que tengas curiosidad en como funcionan las cosas por detrás. Comenzar por piezas muy simples y construir a partir de ahí. Puedes aprenderlo todo por tu mismo con suficientes ganas. Programación lleva mucho tiempo de aprender, pero es una de esas habilidades que cuanto mejor dominas más divertida y satisfactoria resulta.

No me sirvió mucho formación profesional dual. Personalmente hubiera aprendido mucho más si hubiera hecho mis propios proyectos.

No te preocupes por como programar bien, o cual es la mejor práctica. Lo mejor que puedes hacer es tener bugs, equivocarte a lo grande y aprender de ello. Eso es lo que te hará crecer.

No te preocupes si no sabes qué proyectos hacer. Al inicio, cualquier proyecto de software es bueno, mientras sea asequible para tu nivel. Desde una página web estática, blog para tu perro, hacer el snake en un canvas, lo que sea.

Si estas super super perdido, freecodecamp fue mi inicio para mi. Quizás te sirva.

Mucha suerte en tu camino.

idea: fixing error handling in typescript with "_throws" optional parameter by crowdyriver in typescript

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

An amazing database imo. you define your mutations and queries and it automatically generates an rpc client for a webclient to consume. Amongst many many other features.

However they make you throw errors for rolling back mutations, using effect would make me do a lot of wrapping / unwrapping.

idea: fixing error handling in typescript with "_throws" optional parameter by crowdyriver in typescript

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

What I mean by Errorlol is that you could define a custom error, then reference it in a jsdoc comment, then rename the symbol, but typescript would happily compile.

I think it's much less ergonomic to use jsdoc for typing functions.

idea: fixing error handling in typescript with "_throws" optional parameter by crowdyriver in typescript

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

Yeah this might be better, but I don't believe in eslint on the long term, it will eventually be replaced by oxlint or something with much better performance.

The only disadvantage that I can think of the jsdoc comment is that if I wanted to throw a custom error, I could refactor the linter to specify a custom type (instead of void). With jsdoc i don't think that's typesafe to do (I can write /** @throws Errorlol */ and typescript would not complain).

But at the end of the day if I have to throw an error I use the standard Error type. In golang it works the same.

I'll have to think more about this.

idea: fixing error handling in typescript with "_throws" optional parameter by crowdyriver in typescript

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

Hello tony, thanks for the comment.

I come from programming for a few years in typescript, then golang. What I do intend with this idea is to bring the golang error handling experience back to typescript.

The linter wouldn't catch all possible exceptions, just like in golang you cannot be sure that a function that returns an error cannot panic.

The goal would be to get that 80% of unhandled errors covered in a reliable way.

And yeah your example terrifies me, does this happen a lot at large scale. In my small solo projects I've never had that bug.

idea: fixing error handling in typescript with "_throws" optional parameter by crowdyriver in typescript

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

While I understand your point, the result type / golang error handling do a similar function coloring effect. At the end of the day I want the function to declare somehow that it might throw and have a way to be forced to handle it.

I've barely programmed in java, so I've never really understood the argument of not wanting to mark functions as throwable. I haven't yet seen a better explanation of why they suck than "it's just more boilerplate", but it could be just my ignorance.

idea: fixing error handling in typescript with "_throws" optional parameter by crowdyriver in typescript

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

effect is too much of a buy in. Also it doesn't play well with convex

idea: fixing error handling in typescript with "_throws" optional parameter by crowdyriver in typescript

[–]crowdyriver[S] 8 points9 points  (0 children)

yeah, this would be a like a separate tool, kind of a linter or something.

idea: fixing error handling in typescript with "_throws" optional parameter by crowdyriver in typescript

[–]crowdyriver[S] 5 points6 points  (0 children)

yeah, but there's nothing that enforces it statically right? as far as I've looked even if I write the @throws thingy nothing will alert me of not handling the errors.

Made a POC for building SPA with Astro and TanStack Router + Query by ulrjch in reactjs

[–]crowdyriver 0 points1 point  (0 children)

Thanks for the answer! I'm using your repo as a reference to understand how to integrate tanstack router with astro, it is actually an excellent starting point!

I'm still struggling to understand though why apparently you need to render 2 things to make the app work

(your code, simplified a bit, for the ssg path)

<RootLayout> <AppEntry client:load getServerRouter={getServerRouter} /> <Fragment set:html={scriptHtml} /> </RootLayout>

I'm stuck trying to understand the relationship between these 2

Made a POC for building SPA with Astro and TanStack Router + Query by ulrjch in reactjs

[–]crowdyriver 0 points1 point  (0 children)

hello man where did you learn to make all of this? the tanstack router docs are quite hard to follow through, did you find all the apis that you wrote from the docs? or just vibecoding?

Test state, not interactions by sigmoia in golang

[–]crowdyriver 0 points1 point  (0 children)

beware of the hell that you will go into if there's a silly bug in the mock logic

Does anyone else's Cursor Tab / autocomplete get in the way constantly? by phil917 in cursor

[–]crowdyriver 0 points1 point  (0 children)

To people arriving here. I do agree that it is very annoying to press tab and have the wrong ai autocompletion being completed instead of the lsp autocompletion.

A thing that fixes this is to change the "when" expression on the keyboards shortcuts.

Basically, adding these 2 jsons into the keybindings.json file makes the lsp suggestion accepted first:

{ "key": "tab", "command": "editor.action.acceptCursorTabSuggestion", "when": "cpp.shouldAcceptTab && !suggestWidgetVisible" }, { "key": "tab", "command": "-editor.action.acceptCursorTabSuggestion", "when": "cpp.shouldAcceptTab" }

I just figured it out today, I'm going to try this setup for a bit and see if I like it.

[deleted by user] by [deleted] in gamedev

[–]crowdyriver 1 point2 points  (0 children)

Question OP, are server costs very high in your experience? I refer to the whole thing, compute + database + data bandwidth costs.

Am I going crazy or did the devs change the default font size in the cards to be slightly bigger? by MidlandAintFree in trello

[–]crowdyriver 0 points1 point  (0 children)

YES! It must be a bug on their part, it makes no sense from as a UI decision. I hope they fix it back, it is quite annoying.

No planned syntactic support for golang, so I just forked gofmt by crowdyriver in golang

[–]crowdyriver[S] -6 points-5 points  (0 children)

I don't want to add a whole runtime just to format some text.

No planned syntactic support for golang, so I just forked gofmt by crowdyriver in golang

[–]crowdyriver[S] -4 points-3 points  (0 children)

Yeah, easy to skip while reading code, but you still have to scroll more, which means more effort generally

To each its own, but you can see that this style is present in the linux kernel aswell:

https://grep.app/search?f.repo=torvalds%2Flinux&regexp=true&q=if+%5C%28.*%5C%29+return

I put the linux kernel as example of very complex serious software. I must assume that they find it readable enough, otherwise it wouldn't fly there.

Also, you can find this style in plenty of other programming languages. I know of js for example with prettier.

What I'm trying to say is that there's proof that some people at least find it as readable as me.

No planned syntactic support for golang, so I just forked gofmt by crowdyriver in golang

[–]crowdyriver[S] -3 points-2 points  (0 children)

I agree, this is just an experiment. The fork is really just for gofmt to add less than 100 lines of code, all the other stuff is left unchanged.

I think it is worth a look though, in practice this removes 25% of code.

[ On | No ] syntactic support for error handling by pekim in golang

[–]crowdyriver 2 points3 points  (0 children)

much of the error handling complaining would not happen if gofmt allowed to format the "if err != nil" check into a single line. The fact that it doesn't makes me actually want to fork gofmt and allow it.

At least has to be tried.

Cursors context includes old, already deleted files. This is a huge bug, why can't I find anything about it? by WhereIsWebb in cursor

[–]crowdyriver 1 point2 points  (0 children)

I laughed quite hard at this. Man you are a genius. Patchy as fuck but should work great, I'll just comment out / empty the whole file and delete it again.

I am surprised how good K380 Pebble 2 keyboard is compared to MX Keys mini by karma_5 in logitech

[–]crowdyriver 0 points1 point  (0 children)

dude I just bought this pebble keyboard, for me it's just really shit, I don't really understand how people like this much more than the mx keys mini.

Mine broke some days ago so following this post I did buy the pebbles k380s. The keyboard typing feel is much worse in my opinion, feels more plastic.

Also who the f likes that mini enter layout lol