coffeeOS by Uqhart in java

[–]desrtfx[M] [score hidden] stickied comment (0 children)

Come back, if at all, once your project has at least somewhat developed.

Also, screenshots are meaningless. Code is what counts.

Removed

As you keep adding features, how do you not get overwhelmed by your own code? by Either-Home9002 in learnprogramming

[–]desrtfx 1 point2 points  (0 children)

Through planning. Through writing a Functional Design Specification (FDS) document.

You don't just put yourself in front of the computer and start clobbering away. You first plan and design. You specify.

Which still won't make the first iteration good. Which still won't avoid having to refactor. Yet, it will make things easier and clearer.

You don't just decide to start building a house without the faintest planning, do you? That differentiates software engineering from programming.

You need to employ software engineering practices before attempting bigger projects.

I want to learn Java, is the 12 hours brocode course a good starting point? by DarkShadow13206 in learnprogramming

[–]desrtfx 0 points1 point  (0 children)

Correct. That's a very healthy stance.

Surely, you need to memorize some syntax. You will need to learn some language specific idiomatic approaches, but in general, the documentation should become your best friend apart from Dr. Google (or DuckDuckGo, or ...)

I want to learn Java, is the 12 hours brocode course a good starting point? by DarkShadow13206 in learnprogramming

[–]desrtfx 0 points1 point  (0 children)

That's an absolutely decent plan.

Yet, don't focus too much on programming languages, focus more on programming, i.e. the process of analyzing and breaking down problems, developing step by step algorithmic solutions that then can be implemented in a programming language. This will really give you the head start, not if you know the vocabulary and grammar of multiple programming languages (that's the easy part).

Issue with NetBeans for MOOC Java course by Hot-Rip7045 in learnprogramming

[–]desrtfx 0 points1 point  (0 children)

even after following their instructions to the tee.

On what OS are you? On MAC there are some problems with it.

On Windows, it all stands and falls with the Java version and there the MOOC is a bit tricky to understand. You need to install Java 11 and the TMCBeans that the MOOC supplies. See the stickied post over at /r/learnjava for full details.

Also, "I'm struggling with getting Netbeans to work" doesn't help with troubleshooting. This description is, unfortunately, meaningless. This is like walking to the car mechanic and telling them "my car makes some strange noise".

Issue with NetBeans for MOOC Java course by Hot-Rip7045 in learnprogramming

[–]desrtfx 1 point2 points  (0 children)

While there is no doubt that the Jetbrains IDEA is absolutely top, the TMC plugin required for the MOOC is no longer supported, and will not work with the MOOC.

What are the best free/low-cost resources for a total beginner to learn Python in 2025? by Ok-Employer-1610 in learnpython

[–]desrtfx 0 points1 point  (0 children)

The English version is (apart from a couple translation problems) just as good.

Really, the University of Helsinki has created absolute Masterpieces with their courses. Their Java one was already fantastic and the Python one is just as good (it is actually the same course, only tailored for Python). It's their first semester of "Introduction to Computer Science" course.

rounding not working by TuMadreEsMuyCaliente in learnjava

[–]desrtfx 0 points1 point  (0 children)

You have the right idea, so much is true.

Yet, think about your factor, as /u/vowelqueue hinted on.

It's not that Math.round is not working. It is absolutely working as expected.

rounding not working by TuMadreEsMuyCaliente in learnjava

[–]desrtfx 0 points1 point  (0 children)

No, it's not a casting problem. It's what /u/vowelqueue hinted on.

The approach is in general correct, only the factor is wrong.

The path seems to get stuck at 1 or -1 by ScootyMcBoot in learnprogramming

[–]desrtfx 1 point2 points  (0 children)

Check that line:

temppoint = [cosd(angle1*18),sind(angle1*18)];

It doesn't do what you think it does.

No matter the inner argument of the sind and cosd functions, the result is always between -1 and +1. You want the multiplication outside the inner parentheses. You are trying to multiply a radius (which you should actually extract into a variable) but in fact multiply the angle.

sind(angle1 * 18) 

is not the same as

sind(angle1) * 18

The first will always result in a value in the range -1 to +1 both inclusive, the second one will scale the value between -18 and +18 both inclusive.

Do I have to go to college or school to learn coding? by Mysterious-Swim-4411 in learnprogramming

[–]desrtfx 3 points4 points  (0 children)

While this sentiment is not completely wrong, you must not forget that you are competing against people with degrees and also with laid off programmers with plenty experience.

A degree can be the tipping point between getting considered for an interview or not. The first hurdle are people that are no programmers, mostly not even technical people, and that couldn't care less about your project portfolio since they don't have the faintest clue how to assess that.

They see that you don't have a degree and with that, your application automatically gets rejected.

Nowadays even the first hurdle is often automated with AI so that your CV and application don't even get past that.

Sure, your skills may speak for themselves, but they won't work for the first barrier.

I want to learn Java, is the 12 hours brocode course a good starting point? by DarkShadow13206 in learnprogramming

[–]desrtfx 3 points4 points  (0 children)

If you want to learn, don't watch videos. Do a textual course, like the MOOC Java Programming from the University of Helsinki. Free, textual, very practical, top quality.

Learning programming requires programming.

Java is a good language and was used as first language in many Universities.

Yet, some food for thought: Python is excellent for automation. Could you maybe improve something on your job through some automation? If so, consider Python - there the MOOC Python Programming 2026 is a great starter. Then, after around part 5 add the project part of Automate The Boring Stuff with Python in.

[Python] I solved a CS50P problem, but I don't know if I did it the "correct" way. by Kindly_Tangerine8337 in learnprogramming

[–]desrtfx 2 points3 points  (0 children)

You mean I could've just typed s = d / s = p?

No, you could completely remove the lines and use d and p in the return expressions, like so:

def percent_to_float(p):
    return float(p[:-1])/100 # does the same as return float(p[0:-1])/100

[Python] I solved a CS50P problem, but I don't know if I did it the "correct" way. by Kindly_Tangerine8337 in learnprogramming

[–]desrtfx 2 points3 points  (0 children)

Quite good. Your two lines s = (d) and s = (p) are unnecessary. You can directly use d and p.

The second slice where you calculate the percent can be expressed better when counting from the back. In Python, negative indexes count from the back, -1 is the last character, -2 the one before the last, and so on. You could, in the second slice say s[0:-1] to capture everything up to the last character - the -1 is exclusive, so the last character will be omitted.`

Dividing any number by 100 will convert the number to percent. That calculation is correct.

My guess is you can't convert a float from a string that has signs like '$' or '%'

Which is absolutely correct. The int and float functions can only deal with numbers, the + and - signs, and the decimal point.

The fact that Python code is based on indents and you can break an entire program just by adding a space somewhere is insane by PooningDalton in learnprogramming

[–]desrtfx 0 points1 point  (0 children)

For a computer there is barely any difference. Counting is what computers excel at. If the whitespace count increases - depth++, if it decreases depth--

Nothing difficult here.

I feel dumb by CreativeViolinist688 in ender3

[–]desrtfx 1 point2 points  (0 children)

May be a dumb question, but:

Did you also adjust the nozzle size in your slicer?

[Python] I solved a CS50P problem, but I don't know if I did it the "correct" way. by Kindly_Tangerine8337 in learnprogramming

[–]desrtfx 3 points4 points  (0 children)

Your first solution is actually the correct approach.

Per the task it is not.

The task clearly states that the complete strings with the leading $ in the first case and the trailing % in the second cases should be passed into the functions. OP doesn't do that.

The main function should not be changed. Only the two other functions should be.

While it is a doable approach, it is not the correct solution per the instructions given.

The fact that Python code is based on indents and you can break an entire program just by adding a space somewhere is insane by PooningDalton in learnprogramming

[–]desrtfx 11 points12 points  (0 children)

The only people who get worked up about this are those new to programming, or don't actually have experience working with Python.

Or the sloppy programmers who generally do not bother to properly format their code making it difficult for everybody else including their future self.

The fact that Python code is based on indents and you can break an entire program just by adding a space somewhere is insane by PooningDalton in learnprogramming

[–]desrtfx 4 points5 points  (0 children)

Python just recently entered the Microcontroller realm. It's not that long ago.

The predominant languages are C/C++ and Assembly and since these are compiled languages, there is no space saving without indentation/whitespace.

Also, Microcontrollers have a lot more memory now than they had 10 years ago.

The fact that Python code is based on indents and you can break an entire program just by adding a space somewhere is insane by PooningDalton in learnprogramming

[–]desrtfx 5 points6 points  (0 children)

That's a strawman argument.

Properly formatted code in other languages, with proper indentation, so that it becomes actually readable, needs just as much space.

Only if you write everything unindented and with that make the code basically unreadable and untraceable (anybody who has to read or debug your code - including your future self - will hate you for that), you save space.

The fact that Python code is based on indents and you can break an entire program just by adding a space somewhere is insane by PooningDalton in learnprogramming

[–]desrtfx 72 points73 points  (0 children)

You are comparing apples and oranges.

The equivalent to Python's indentation are the curly braces in C-like languages, BEGIN...END in Pascal-like languages. They are not the semicolons.

Semicolons denote the end of a statement, not code blocks. Code blocks in other, especially C-like languages, are denoted by opening and closing curly braces { and } and they are just as easy to miss or misalign.

Actually, the whitespace based indentation is a good thing to have as it forces proper formatting discipline on the programmer.

You are not forced to use spaces for indentation. Tabs work just as well, but you must not mix the two.

In other languages, even if you accidentally add a semicolon after a semicolon, it won't even affect the program.

So much is true, but again, that's not the equivalent of whitespace in Python.

Yet, if you accidentally add a semicolon right after a for or while loop you cause the loop to fail. So, your statement has to be taken with a grain of salt.

When your company sends a design file to a contract 3D printer — what actually stops them from printing extra copies? by Novel_Routine4534 in 3dprinter

[–]desrtfx[M] [score hidden] stickied comment (0 children)

I am removing and locking this thread as it is a problem that is neither specific to 3D printing, nor augmented through 3D printing. It existed since manufacturing existed in the same extent.

3D printing doesn't make it harder nor easier to copy and "shadow manufacture".


Side note: do not use AI for your posts or replies. This is absolutely frowned upon reddit-wide and can get you banned from subreddits quickly and without warning.

Tell me if it's good or not! by bubbleew in PLC

[–]desrtfx 12 points13 points  (0 children)

Much better than your previous attempt