Programming thread

And if you try to use it for making a huge architecture, you're most likely going to be in for a world of hurt.

This doesn't make sense. Language is irrelevant in designing architecture. When figuring out the architecture for your system, you use individual services, DBs, etc as your building blocks, not languages. The language being used shouldn't affect your architecture.
 
Do you have any good videos or resources
depends on what you actually want to do
go out and find a language instead of sitting here asking to be spoonfed like a faggot
be like certain other posters and come in with mostly-complete but janky c programs asking for feedback
in short: just do it because we can't do it for you
This doesn't make sense. Language is irrelevant in designing architecture. When figuring out the architecture for your system, you use individual services, DBs, etc as your building blocks, not languages. The language being used shouldn't affect your architecture.
I meant size and complexity. JavaScript is sort of an extension language and making huge applications in it isn't what it was originally designed for. I'd look to see if there were better tools for the job before writing an application entirely in JavaScript.
 
  • Like
Reactions: Bababooey Warlock
Do you have any good videos or resources
I've heard App Academy Open is free.

TBH this --
Here's an idea: Open up a text editor, make an HTML page with a <canvas> element, then start drawing things with a <script> tag. Eventually you can use DOM events to take input and register timer callbacks. You will then be able to make simple games. Get familiar with consulting references and looking things up as you program.
-- is either best advice or worst advice depending on what kind of person you (@Sargon's wife's son) are.

A lot of modern programming is programming an "engine". You download and install finished, working software that does nothing or nothing useful, and add useful functions. For example, you can download a program that opens a blank window in your operating system, then add a text area to allow the user to type text into it, a button to save the text into a file, detect and display specific words in different colors, counters for words and characters at the bottom, etc: you start with a blank window and make a text editor out of it. Then you add http calls and turn it into a bot to spam peddit.

HTML canvas is that, but the engine is built into the browser so you don't even need to install anything. It's both simple and useful (you can find a Canvas job!), but it can be hard/impossible to understand and debug if you're completely new to programming. Try it, and if you're lost, install Python and Pycharm Community and add numbers together or something to understand basic concepts.
 
  • Like
Reactions: y a t s
Thanks I'll try that out
just wanna learn how to code because it seems like it'd be something useful I already know how to do my own wiring and build buildings and somewhat foundations but I haven't done foundation work in probably a year or two
feel free to hit me up if you need pointless information about wiring and structural loads of buildings and concreting or masonry
 
Last edited:
-- is either best advice or worst advice depending on what kind of person you (@Sargon's wife's son) are.
I recommended that specifically because it's very low-friction. You can't get turned off by scary tools (compilers, command lines, and IDEs) when said scary tools are just things that everybody already has in the first place.
 
I recommended that specifically because it's very low-friction. You can't get turned off by scary tools (compilers, command lines, and IDEs) when said scary tools are just things that everybody already has in the first place.
I'll add to that and say that it has a very fast feedback loop, it takes no time at all after writing something to seeing what effect you had.
 
Last edited:
My Advice is to download vscode and install a compiler for your OS. Then use the C extension to help you out.
I'd use msys2 and any non-electron text editor because electron is gay and compiling C using an IDE extension feels wrong to me. It's just better to start out by running gcc in the shell so you can see it working and there's no "magic" happening where you can't build a reliable mental model of what's going on.
 
I am building an application with electronjs to put in my portfolio.

I have almost 1000 lines of code and I decided to organize it all into different objects.

I have a module called data.mjs that stores all of these objects and exports them to be used elsewhere.

I decided that before I do anything else I want to finish organizing my objects that have 3 nested objects named info, ui, and handle.

Info stores data variables like the users name. ui stores all of the variables for the DOM, and handle stores all of the functions. For example

JavaScript:
const data = {
 info: { //user information here 
},
 ui: { //element ids that display user information 
},
handle: { //functions
 info: { //functions that manipulate info
},
 ui: { //functions that manipulate the DOM
 },
}

What is the most efficient way to go about doing this because I have almost 1000 lines of code and several objects that I am going to do this to.
 
Last edited:
Maybe someone here can help since it sounds very basic bitch thing to do in c++. I have a device on an interface with some arbitrary ip (and I know noth their ip), how do I change the device ip (before connecting it) to a specific ip which I need for the connection to be stable. Even a library recommendation would be plenty.

What is the most efficient way to go about doing this because I have almost 1000 lines of code and several objects that I am going to do this to.
I don't know the language but isn't it what's inheritance for?
 
Maybe someone here can help since it sounds very basic bitch thing to do in c++. I have a device on an interface with some arbitrary ip (and I know noth their ip), how do I change the device ip (before connecting it) to a specific ip which I need for the connection to be stable. Even a library recommendation would be plenty.
This isn't strictly a programming thing, it depends more on the device and libraries it uses. If it's Linux, something embedded like an ESP32 or Pico, something else?
 
This isn't strictly a programming thing, it depends more on the device and libraries it uses. If it's Linux, something embedded like an ESP32 or Pico, something else?
It's a camera connected to an ubuntu PC. I have a library called aravis for it, but it requires me to connect to the camera before changing its ip.
 
It's a camera connected to an ubuntu PC. I have a library called aravis for it, but it requires me to connect to the camera before changing its ip.
Well, without the IP you can't really change an IP.

If this is a single device to a single network port with no DHCP and a static but unknown IP you have to discover it somehow.

Typical methods: tcpdump/libpcap() to wait for it to send a packet so you know what it's IP address is. arping or simple pings through addresses especially useful if you know it always uses a given subnet.

Something like this might work as it looks like aravis has some discovery capabilities:

 
I recommended that specifically because it's very low-friction. You can't get turned off by scary tools (compilers, command lines, and IDEs) when said scary tools are just things that everybody already has in the first place.
Yes, absolutely. But there are also IQ 81 genuises (like me) who really benefit from a good IDE and an opinionated "do this" installation+quickstart routine, provided it doesn't fail. Javascript can be brutal. Having to effective "write code" to inspect objects is hard on noobs, they can't reliably repeat the same series of checks to see what went wrong between one version and another. I used to tutor Python beginners, one was coding in jupyter and managed to redefine int; another was testing code in the console and had redefined list in it. The ability to tell where and when exactly something crashes can be revelatory.
 
Back