programming

This magazine is from a federated server and may be incomplete. Browse more on the original instance.

Paragone, in Exercism

I’ve tried it, for several languages…

It seems good, to me, but I’ve learned to invest in the BEST 2-ish recent books on any language I’m trying to learn:

the difference between average vs GOOD instruction is cliff-like, and I need to understand why things work the way they do.

( with 2 different-author books, best I can get, then if 1 author is explaining something in a way I can’t get, then I’ve got a good alternative.

Better, though, is that if I make myself work through both, then it’s much more likely to stick, see? : )

I consider Exercism to be a good part of a healthy ( programming-learning ) breakfast!

: )

CombinedArms: use EVERY dimension of leverage you can, simultaneously, and more-certainly win, quicker!

I’m saying this, and I also saying I’ve had to report bugs in their lessons, 1 or 2 times.

I need Exercism.

vivadanang,

Best combined-arms analogy I’ve seen this week. Did you go to command and general stack college?

Templa, in Introduction to TypeScript for devs without JS experience?

As many people said here, I’d recommend getting more familiar with JS and then jumping to the documentation which has great resources like this one.

OneRedFox, in Introduction to TypeScript for devs without JS experience?
@OneRedFox@beehaw.org avatar

I know it’s not what you want to hear, but you should really learn JS first and then go through the handbook you linked to learn TS. As you’ve noticed, the majority of the resources for TypeScript will assume that you’re already proficient with JS and you’ll have an easier time with the ecosystem if you take that approach.

ted, in Introduction to TypeScript for devs without JS experience?

I would probably recommend “Just JavaScript” as a way to develop mental models of JS, then the TypeScript handbook to learn the core principles behind typings.

Not what you asked for, sorry, but probably where I’d start.

lemmyvore, in Introduction to TypeScript for devs without JS experience?

seem rather unstructured to me (e.g. dropping a lot of different ways and shortcuts to do things without explaining concepts

That’s because there’s no way to explain TS concepts without the JS context, so any attempt to skirt around JS it’s going to feel like there’s a big part missing. You should think of TS like a way to write JS differently, it’s mostly a replacement for JSDoc/linting rolled into a nice package. It’s not a fully standalone different language.

The closest comparison would be type hinting in Python – it’s useful but there’s no way you can use Python knowing just type hinting.

homoludens,

Like I said in my other replies: I am not attempting to skirt around JS. If TS is a superset of JS, it would obviously make no sense to try to avoid JS. What I’m looking for is a book/tutorial/… that is structured in a way that it teaches the most important parts the way they are used in TS (including JS) first.

Example: when functions are taught it would explain the basics of JS functions along with the parameter type annotations of TS, because that’s the way functions are used in TS.

chaos,
@chaos@beehaw.org avatar

There just isn’t much use for an approach like this, unfortunately. TypeScript doesn’t stand alone enough for it. If you want to know how functions work, you need to learn how JavaScript functions work, because TypeScript doesn’t change that. It adds some error checking on top of what’s already there, but that’s it.

An integrated approach would just be a JavaScript book with all the code samples edited slightly to include type annotations, a heavily revised chapter on types (which would be the only place where all those type annotations make any difference at all, in the rest of the book they’d just be there, unremarked upon), and a new chapter on interoperating with vanilla JavaScript. Seeing as the TypeScript documentation is already focused on those exact topics (adding type annotations to existing code, describing how types work, and how to work with other people’s JavaScript libraries that you want to use too), you can get almost exactly the same results by taking a JavaScript book and stapling the TypeScript documentation to the end of it, and it’d have the advantage of keeping the two separate so that you can easily tell what things belong to which side.

butterypowered, in Introduction to TypeScript for devs without JS experience?

I’ve come from many years of Java experience to the world of Node/JS.

You can learn JS without TS, but not TS without JS.

TS is just a tightened up JS really.

homoludens,

Yes, and I would like to learn the tightened up version rightaway ;-) When I want to learn e.g. about functions, I want to have a chapter “Fundamentals of functions” or something (and probably another chapter for advanced stuff about functions, edge cases etc.). Right now it seems like I would have to first read about functions in a JS book without knowing how they will be used best in TS). And then I would take another book and read about the modifications that TS makes to them.

I get that in order to “fully understand” TS I need to “fully understand” JS. But in the beginning I would like something that explains the core concepts of TS (which of course may and often will include JS concepts).

andros, in Introduction to TypeScript for devs without JS experience?
@andros@hostux.social avatar

@homoludens I don‘t think is a good idea. Every TypeScript developer ought know deeply JavaScript. For example, if you work with Django you ought programming with Python.

homoludens,

Yes, that I need to learn some amount of Javascript is a given. But I would rather not learn some JS aspects that I won’t need anyway, because TS prevents me from using them or has other best practices.

andros,
@andros@hostux.social avatar

@homoludens Can you give me some example?

homoludens,

Please see my other replies.

madkarlsson,

Typescript doesn’t really remove anything you learn in JavaScript. Like at all. It’s not really a library as such. It adds ways to enhance your JavaScript, with typing, structure, and tooling

Learn JavaScript as much as possible. Every bit you learn will benefit you with typescript

homoludens,

I know TS doesn’t remove that much from JS, but I expect the typing, structuring etc. to prevent some behavior that can occur in JS - otherwise what would be the point of e.g. the typing system? So that are the parts I don’t need to learn (at least not at first).

I think an important point for me is that I’d rather learn “from a TS perspective”, that is starting with best practices and common use cases as they appear in a TS environment. Right now it sounds to me that the usual way would be to read some JS book, where I learn e.g. about functions or objects. And then I would read another book with all the modifications that TS makes to e.g. functions or objects.

lemmyvore,

otherwise what would be the point of e.g. the typing system?

What’s the point of type hinting in Python?

madkarlsson,

Its important to understand that:

  • JavaScript is typescript
  • Typescript is JavaScript with types

When you are writing typescript, you are writing JavaScript but have additional syntax to help support type safety and structure. If you are creating a function that does x, it should very much be the same in JS and TS, just in TS it has extra syntax

TS doesn’t modify the way JS works, its one of the stated needs for the tooling.

In TS, for example, I can denote an object as


<span style="color:#323232;">const x: Record = {}
</span>

In JS it would be


<span style="color:#323232;">const x = {}
</span>

It’s still nothing but an object. TS doesn’t change the functionality, it just adds typing and checks that you are using that object properly as static build step.

gkpy, in Bruno HTTP client, offline alternative to Postman/Insomnia

if i wasn’t a terminal person, this looks ideal! no reinventing the wheel for lock-in’s (read business model) sake…

the only thing i don’t like here is their custom bru format. json, yaml or any other standardised markup fit their manifesto better as well imo

lonewalk, (edited )

Yeah, I’m annoyed by this as I’m looking to script a rudimentary Bruno->postman tool, so I won’t be blocked at work on Monday. means I need to dig into their tooling.

they have an internal bru2json method that is used when exporting a collection into a single file, so I wonder what the benefit is keeping it in the proprietary format at all. maybe it makes it a bit easier to edit by hand, which is a supported use case, but there’s JSON tooling to enable good autocompletes/schemas iirc

EDIT: I has made script (very wip) github.com/wtpisaac/bruno2postman

moroni,
@moroni@lemmy.ca avatar

Oh, share your script if you will, please!

lonewalk, (edited )

If I get it minimally working (aka basic HTTP request and headers able to export), I will upload it to GitHub and reply to you with a link.

lonewalk,
gkpy,

so I wonder what the benefit is keeping it in the proprietary format at all

yeah my guess was easier editing and ux when collaborating via github, diffs on json don’t look great

but yaml (for all it’s faults) would still be better haha or now that i think about it:

both look similar to bru, would share the advantages over json and seem better spec’d/supported

moroni,
@moroni@lemmy.ca avatar

Looks like it has CLI support: docs.usebruno.com/cli/overview.html

Templa, in Bruno HTTP client, offline alternative to Postman/Insomnia

What about Hopscotch?

lonewalk,

I saw that too, but I couldn’t tell if it was a community or corporate backed thing; I also don’t like that it’s only available through a browser (I know Bruno is Electron, but having a separate desktop app is nice to me)

At minimum Hoppscotch sells some kind of Enterprise Edition docs.hoppscotch.io/…/getting-started

I don’t know the details, but I’ve just gotten burned too much. Bruno seems genuinely fully libre, no bs, so I’m hoping that it gets more traction.

Templa,

Thanks for letting me know! My spouse showed me Hopscotch but I haven’t used it yet.

pkulak, in Bruno HTTP client, offline alternative to Postman/Insomnia

Bash + HttpPie is the way to go.

larmicon, in Bruno HTTP client, offline alternative to Postman/Insomnia
@larmicon@feddit.de avatar

Was actually confronted with the same problem - thank you for the solution!

lonewalk,

No problem. Trying to raise awareness of this tool bc Insomnia totally screwed me up at work today.

StringPotatoTheory, in Say I want to make an app on my phone for personal use. How to begin?

I’ve been using flutter + android studio and I’m enjoying it (as much as you can while making a mobile app). Android studio is a lot but it includes android emulators which is nice to test stuff on if you don’t feel like getting your phone.

You’ll need to install flutter (works on windows, mac, and linux), android studio (I think vscode also works?), and you can download a sample project, open it, build it, and run it. It’s a great way to see how it works. Then you can create your own project and go from there. Flutter has a lot of packages which I would recommend at looking through (if your app is simple you might not need any of these though).

Once you build and run the app on your android phone, it’s there and you can use it. You don’t need to upload it to google play or anything else (unless you want to share it).

Butterbee, (edited ) in Generating game graphics based on parameters/genetics, where to start?
@Butterbee@beehaw.org avatar

It’s going to depend a LOT on what type of graphical output you are looking for. Are you hoping to have realistic fur on a 3d model with simulated hair? Or is it a portrait only for a 2d game? If you’re searching for this most basic level of information I would not expect to do anything that complicated. That being said what I recommend to look into this kind of thing is to research “procedural textures”. You can find tutorials on how to make materials in substance designer (not painter), or material maker. A good starting point would be to become familiar with the Voronoi texture (edit: also the Musgrave texture), and displacing it using noise textures. This should be a good starting point for you. The basic idea (and this part here is jumping ahead and will make sense once you have learned about parameterized materials and those textures I mentioned) is to set up a material with inputs that you can mathematically blend.

You will also want to become familiar with vector math to get good results since colour information in these programs can be handled the same way as 3d vectors (instead of x,y,z, there’s r,g,b but that’s still just an array of 3 values that can mathematically be handled the same way)

The information you will come across will be for 3d modelling, but if your intent is on a 2d image you can still apply the theory.

Material Maker is free so go ahead and try it out. https://www.materialmaker.org/

Lokoschade,

I do have a 3d game in mind, not hyper realistic but maybe a similar style as the recent Zelda games BotW/TotK especially when it comes to the character/animal models. Thank you so much, this is very helpful!

Butterbee,
@Butterbee@beehaw.org avatar

You can also play around with the shader nodes in blender to learn the basics of the concept. These won’t be able to be used in a game engine directly, but it’s fast and easy to see the results of changes there. And also free!

r1veRRR, in What are your hobby programming projects? I need some inspiration.

Writing a CHIP-8 Emulator was really fun. There’s a lot of resources out there and it’s really fun, small low level project you can “finish” in a week of casual coding. As someone who was mostly coding highlevel in my job, I really learned a lot.

gandalf_der_12te, in Say I want to make an app on my phone for personal use. How to begin?
@gandalf_der_12te@feddit.de avatar

Step 1: Download Android Studio
Step 2: Follow any tutorial
Step 3: Profit

literally that simple

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • uselessserver093
  • Food
  • aaaaaaacccccccce
  • [email protected]
  • test
  • CafeMeta
  • testmag
  • MUD
  • RhythmGameZone
  • RSS
  • dabs
  • Socialism
  • KbinCafe
  • TheResearchGuardian
  • Ask_kbincafe
  • oklahoma
  • feritale
  • SuperSentai
  • KamenRider
  • All magazines