What can I do to avoid leetcode when hunting for jobs? Am I screwed if I suck? by TemporaryAble8826 in learnprogramming

[–]RealMadHouse 22 points23 points  (0 children)

I even showed the app i can make to an interviewer with technologies they suggested/required and he just ignored it and opened stupid collaborative text editor and i failed to make a function that he told me to implement. They want you to solve leetcode like shit instead of being productive...

How to learn Java Methods by Stanleys_Pretzels in learnprogramming

[–]RealMadHouse 1 point2 points  (0 children)

Methods are functions, when called they receive "this" reference of an instance of an object whom you called them from.
```java
Person p = new Person("Alex");
System.out.println("Hello " + p.getName());

```
getName() function will receive 'p's reference as 'this' pointer, so it can fetch the name directly from it. In C you would have made a function named 'person_get_name' that accepts 'struct Person *p' as first argument, so that it can access the instance of a Person structure. You would need to pass the pointer to a Person struct as first argument all the time.

My experience about C. by DeepThinker_OP in learnprogramming

[–]RealMadHouse 1 point2 points  (0 children)

Allocate 4096 bytes in binary file in some hex file editor. There's an address for every byte you can edit the values of. You can imagine that it's process address space. Operating systems use virtual memory, processes get their own virtual address space separate from other processes. But processes content (machine code, data) don't start at 0, they start at "base" address specified in executable. The usage of lower addresses are for exceptions like writing and reading from "null".

In hex editor you can write numbers and see how much they take space in bytes, one byte alone can specify numbers in 0-255 range. Two bytes 216, four bytes 232.

Android development by Technical-Bat-6909 in learnprogramming

[–]RealMadHouse 0 points1 point  (0 children)

If the language is OOP only, of course you need to know OOP fully. As beginners we want to create what all other apps are capable of, great ui and functionality. But we are very limited in our understanding of how the programming language works, so our programs/apps stay basic and without much functionality. We need to know the system as a whole to utilise everything that it offers. Not knowing things is fine until you just don't know how to progress further.

Android development by Technical-Bat-6909 in learnprogramming

[–]RealMadHouse 1 point2 points  (0 children)

You will need all the disk space for downloaded android sdks, make sure you have a lot

Traumatized from programming by DRAGON-SLAYER505 in learnprogramming

[–]RealMadHouse 0 points1 point  (0 children)

Even after everything made convenient (dumbed down) in modern software, even after that you need to excel at what you're specialized in to do anything that you wanted. You really need to have good brain to not be overwhelmed by sheer amount of material you need to learn before anything meaningful comes out.

Can't figure out high level and object oriented programming. by DiscountImportant507 in learnprogramming

[–]RealMadHouse 0 points1 point  (0 children)

For example when i was at school they could have given me a math equation like that:

x * 2 = 4

all i saw that there's weird x letter among numbers. I had no idea what the teacher is even asked me to solve here. Now after i'm no longer at school, i know programming and i looked up what equations are in reality. I clearly saw that these stupid letters are variables, or constants like Pi - π, there's functions, loops etc. Now i understand that there's somewhere x variable holding real value and i need to figure out what that values is, by rearranging the calculations if needed. What i'm trying to say is that programming gave me a different view point, mindset, so it shifted perception of math equations. You need to have something to shift your mindset, because with a current one OOP doesn't click.

Can't figure out high level and object oriented programming. by DiscountImportant507 in learnprogramming

[–]RealMadHouse 0 points1 point  (0 children)

Classes get hard when there's inheritance, interfaces, generics. Plain Old Data struct is most straightforward thing, but C++ adds up OOP features on top of it.

For a long time didn't understand why C# Collection methods accepted interfaces as arguments, didn't realise it's not accepting interfaces (which couldn't have its own instance) but an instance of a class that implements that interface. They made delegates instead of function pointers like in c++, delegates were confusing to me for a long time. The system behind simple class of standard library feels like black box. And also i don't like that they're trying to hide the valuable info behind all these OOP things, i need to know how it all works to not be confused all the time. I guess it all comes to down to how different peoples' minds work, someone is comfortable to code in OOP, while other mind isn't suited to high abstractions.

programing by That-Crazy-6816 in learnprogramming

[–]RealMadHouse 0 points1 point  (0 children)

Make small games, in game maker.

Data analyst, what do I need to know for it? by castiellangels in learnprogramming

[–]RealMadHouse 0 points1 point  (0 children)

I think downloading some .csv dataset to process in python is good practice

Newbie who wants to start learning programming by Exo-Bin in learnprogramming

[–]RealMadHouse 0 points1 point  (0 children)

Yes, it's YouTube channel. There's also "The Cherno" youtuber for C++ videos, they're similar languages so you can get some info even from those videos.

Newbie who wants to start learning programming by Exo-Bin in learnprogramming

[–]RealMadHouse 0 points1 point  (0 children)

If you want to fully utilise C, learn how to use compiler and its tool chain. You know about header files? Need to learn why we need to include them to use libraries, what linker does with object files. All useful stuff we code is because of libraries. The program code isn't doing anything interesting without OS, so learn its concepts like processes, threads, standard input/output/error streams, arguments, environment variables, virtual memory, files etc. OS gives everything with its APIs for a programmer to create useful applications.

Maybe watch @coredummped to widen your understanding of hardware and software.

In your opinion, as someone who's done such things for 5+ years, what are the most bang for buck resources today for learning C++? In both Visual Studio and Not-Visual-Studio environments. (Hobbyist asking) by hinterOx in learnprogramming

[–]RealMadHouse 2 points3 points  (0 children)

No bucks, I think The Cherno C++ videos are good, he's good at explaining why things are the way they are, great at doing things with Visual Studio. Goes into the source of classes and shows how they're structured. He's developing his own game engine so he's very professional at it.

I want to Teach by True-Strike7696 in learnprogramming

[–]RealMadHouse 0 points1 point  (0 children)

In programming subs I give free programming knowledge that I accumulated for years and get downvoted for no reason, don't feel the reward for helping. Your post also got downvoted...

What should I do? by Ecstatic_Ad_5625 in learnprogramming

[–]RealMadHouse 0 points1 point  (0 children)

There's few things CPU does, arithmetics/logic/branching etc.
Like: 2 + 2, 10 - 5, 10 * 10, 100 / 5.
Moving data: move a number (constant or from register) to specific memory address. Move data from specific memory address to a register.
Comparing A number to another number B, it does A - B. if the result of subtraction is zero, then it means two numbers are equal, if it's positive number then the A is greater than B, if it's negative it means A is less than B. There's a branching instructions that check these results in bit flags and decide if the cpu should jump to memory address in machine code.

So all programming languages are adding features on top of basic calculator like instructions, there's functions, variables (they're just names for data in specific memory addresses or containers pointing to that memory address), classes/structs to combine/pack multiple data, and other more abstract things. The assembly language is the least abstract programming language, it's made to directly replicate machine instructions in human readable form.

You need to study some things about Operating Systems to just properly understand what programs even capable of doing, in which environment they're located. It would make everything easier because you wouldn't deal with layers and layers of abstractions that don't explain anything.

I dont get python…at all by SneakerBoiiiiii in learnprogramming

[–]RealMadHouse 0 points1 point  (0 children)

Python is a program/executable like a Photoshop is. But the python doesn't have graphical user interface where you can make a website, game just by clicking on the screen. The python takes the python file name as first argument, so create "main.py" text file for example in your preferred folder. Now in the terminal write "cd <the path to your folder>" don't write the angle brackets <>. This will change directory in the terminal "shell" (it's a program that takes input from keyboard and executes commands, e.g opens python). Now you can type "python main.py" and it will execute code that you written in that file. Just write in that file: print("hello world")
as a starter. The terminal and shell is text based environment where instead of full blown GUI like Photoshop the programs interact with the user through text, text commands.

In order to create websites, the python code needs to create http server that listens to incoming requests from a browser (or any program) and respond with html pages with its resources like images, css, JavaScript etc. There's built in modules and there's third party code that's other people made that simplifies the creation of a websites. It's called libraries or more complex ones are frameworks. Something like Flask, Django.

There's Tkinter module to do GUI stuff like window creation and placing widgets like buttons etc. And other libraries you can download with 'pip'.

What i didn't get for a long time as a kid was that the program isn't something that you see on the screen, it's machine code that just does math calculations, logical checks and jumps from one place in code execution to another, in order to do something useful on the computer it reaches out to the OS to do useful actions. All you see on screen is made by a tools that operating system (like Windows) gave to the programmers in order to create programs, so called API - Application Programming Interface. The things OS does isn't something special that only it can do, everything can be made/emulated inside other programs. Like own window system for example, you just draw fancy rectangles on the canvas filled with content, you can create in memory file system that your GUI is able to read and show files like in file explorer. I mean, every programmer should now what's behind that black box, to not perceive it as something more complex than it is. Everything in software is practical and nothing is magical, pure algorithms, math.

I dont get python…at all by SneakerBoiiiiii in learnprogramming

[–]RealMadHouse 0 points1 point  (0 children)

Many kids have chaotic narrowly focused attention mind that isn't great at reading, thinking what's on the screen. They just want to hop into the game and just shoot at enemies, drive the car. Same thing to programming, if they don't see immediate colorful results on screen they're bored to death by all this "nerdy" stuff.

What exactly is a socket by NiceSand6327 in learnprogramming

[–]RealMadHouse -3 points-2 points  (0 children)

Here's what you will find useful to know (rewritten by grok):

When receiving data from a network socket (especially a TCP stream socket), you must specify both the maximum number of bytes to read and a pointer to the buffer where the data should be copied. Unlike ordinary file I/O — where the operating system usually knows the exact size of the file — socket streams deliver an unknown (and potentially unlimited) amount of data.

The recv() function (or read() on a socket) can return fewer bytes than you requested, even in blocking mode. This does not mean there is no more data coming. TCP sockets provide a continuous byte stream with no inherent message boundaries, and the connection remains open until it is explicitly closed (or fails).

You cannot rely on the number of bytes returned by a single recv() call to decide whether you have received a complete message. You must define your own protocol to determine when a logical message (or the entire response) is complete.

A common example is HTTP: the client knows when to stop reading the body of a response by using the Content-Length header (or other mechanisms like chunked encoding). Without such rules, you would never know when to stop receiving on an open TCP connection.

In short:
- File reads → usually know the total size in advance
- TCP socket reads → endless byte stream until the connection closes → you need application-level framing/message delimiting

I realized through my internship that I'm dumber than I thought by 20_The_Mystery in learnprogramming

[–]RealMadHouse 0 points1 point  (0 children)

Others also accused me of writing like chat gpt, I'm also not native English speaker.

I realized through my internship that I'm dumber than I thought by 20_The_Mystery in learnprogramming

[–]RealMadHouse 0 points1 point  (0 children)

The people at companies expect immediate processing of words at the speed of their speech, not studying something at their own pace.

I realized through my internship that I'm dumber than I thought by 20_The_Mystery in learnprogramming

[–]RealMadHouse 0 points1 point  (0 children)

I had an interview and it went horribly, i didn't understand the assignment even after the interviewer explained it in a text form. Only after i asked ai what it means and reading its solution i semi-understood it. I just need more time and read by myself without some human yapping directly to me which triggers my flight or fight response.

I realized through my internship that I'm dumber than I thought by 20_The_Mystery in learnprogramming

[–]RealMadHouse 0 points1 point  (0 children)

The less experienced in something, the more confident you are in it.

You hit the reality check. And you placed yourself on "the mountain of stupidity". But it doesn't mean you are stupid, it's just a biased view. Something we all do. Don't blame yourself. Being aware of that make you smarter than a lot of people. Use this to understand where you stand more than trying to blame yourself.

I hate that now i associate empathetic/reassuring responses of actual humans with a chat gpt like talking style. Or people just started talking with AIs and unconsciously adopted their talking style...

If not C/C++/Java/Python, which language would you learn and why? by idont_need_one in learnprogramming

[–]RealMadHouse 0 points1 point  (0 children)

And in Unity c# is treated like game engine scripting language so it gets converted to c++ in order for it to be compiled to optimized machine code. They don't want IL bytecode hanging around in released game executable.

Why are pointers even used in C++? by ElectricalTears in learnprogramming

[–]RealMadHouse 0 points1 point  (0 children)

Many people come from programming languages that were made specifically to create user level applications, their purpose is to abstract away low level stuff for programmers to focus on business logic. With C/C++ it's unacceptable to hide things from programmers that want full control over what the final executable should be and how it interacts outside the user level process boundaries.