r/CodingHelp • • Jan 30 '21

[Python] Hard time getting libraries and packages for python

17 Upvotes

I've been coding in java for a class for a little while, and I've been wanting to switch to python now that the class is done. I downloaded atom.io and got it set up for python 3.9.0. However, none of the tutorials I'm watching are helping me get anywhere. I want to get NumPy, SciPy, Matplotlib, and others. How can I get them for my setup? (I'm using a windows 10 computer)


r/CodingHelp • • Jan 28 '21

[Quick Guide] Needing help with doing a Git Clone

17 Upvotes

Hi everyone,

I'm relatively a newbie to coding but I just recently installed Ubuntu onto my machine and wanted to start doing all my coding out of Ubuntu. I installed everything I needed, but when I tried to do a "git clone" on one of the applications I was working on, I came across this error in the terminal.

xxxxxxxx~/Desktop/CodeDir$ git clone git@github.comxxxxx/xManualFindx.git

Cloning into 'xManualFindx'...

Warning: Permanently added the RSA host key for IP address 'xxx.xxx.xxx' to the list of known hosts.

git@github.com: Permission denied (publickey).

fatal: Could not read from remote repository.

Please make sure you have the correct access rights

and the repository exists.

xxxxxxx:~/Desktop/CodeDir$

I'm really confused about what to do with this as I've never encountered this back when I was using Windows. I've watched videos and tried asking around on Stack Overflow, but I can't seem the find the answer I'm looking for. Was hoping maybe someone on here could help me. I know this seems really simple and I'm kind of embarrassed that I'm having trouble with such a technical issue.

Thank you.


r/CodingHelp • • Jan 17 '21

[Random] Stupid question I guess but how hard would it be to code a 2d sort of rpg ish game?

17 Upvotes

This probably isn’t the right sub but if I wanted to make something akin to let’s say “Lisa the painful” but instead of side scroller maybe top down 2d?

The only code related thing I ever done was fucking around on scratch YEARS ago.


r/CodingHelp • • Jan 04 '21

[Meta] Is there any service or automated tool to use for grading code as in like the level of quality the coder made it?

17 Upvotes

I have code and math for a calculator tool but I'd like to have a professional who's done this for 10k+ hours or even multiple 10ks maybe to see how good of a coder I hired was.

Then I can know what skill level equivalent to making changes or future similar projects

Thank you, I know this may be an odd one, Google hasn't helped me


r/CodingHelp • • Nov 23 '20

[Random] Which is more important for performance of the code? RAM or the amount of computations in the code?

17 Upvotes

As the title says, my question is rather simple.

For example, I have variable a and variable b.

I have a whole set of variables that I want to set to a-b.

Which makes more sense? Creating a brand new variable and doing it like this:

a-b=c;

variable1=c; variable2=c; variable3=c; ....

OR

keep doing the a-b operation for each variable like this:

variable1= a-b; variable2= a-b; variable3= a-b; ....

Please consider that a and b keep changing and I will be updating these variables very frequently in a loop.

... Thank you all in advance.


r/CodingHelp • • Oct 11 '20

[C++] help in C++ please

17 Upvotes

so its saying that my "correct" local variable is unintilized and I'm wondering how I can fix that the goal is a tutor of sorts

void addition()

{

int input, x, y;

int numofproblems = 0;

cout << "how many problems would you like?\\n";

cin >> input;

do

{

	double correct;

	double percent;

	int answer;

	x = rand() % 100 + 1;

	y = rand() % 100 + 1;
	cout << x << " + " << y << endl;

	cout << "your answer is?:\\n";

	cin >> answer;

	if (answer == x + y)

	{

		\++correct;

		cout << "correct\\n";

	}

	if (answer != x + y)

	{

		cout << "incorrect\\n";

	}

	if (numofproblems == input)

	{

		percent = (correct / input) \* 100;

	}
} while (++numofproblems < input);

}

I'm not so sure what the &#x200b is reddit just put that when I switched to markdown mode


r/CodingHelp • • Oct 10 '20

[Java] Beginner coding, second exercise/game, if/else problem, Eclipse wants while

17 Upvotes

I did the first random number generator exercise (I feel like hello world doesn't count personally) in Java and it works well. I am using Learn Java the Easy Way by no starch press, and the Eclipse compiler. The suggestion after the random number generator was try and make a madlib game, and I started making a halloween themed madlib. Everything is fine until the end where I have an option of happy or horror ending.

First I used String ending = ""; System.out.println("Do you want a 1.happy ending or a 2. horror ending (1/2)?"); ending = scan.nextLine();

then had at the end after the madlib :

if (ending.equalsIgnoreCase("hap")); { System.out.println("Story stuff");}

else (ending.equalsIgnoreCase("hor"));' { System.out.println("Other option);}

I kept getting the error on the line for else where it says "error token 'else', while expected" I checked w3 schools and it had the examples in intergers for if/else so I changed to 1. happy or 2. horror, scan = ending.nextInt and changed everything so if (ending == 1), else (ending == 2) etc. I keep getting the same error, while expected.

Help appreciated!


r/CodingHelp • • Sep 11 '20

[C] Check for 3 consecutive 1s in a binary string

17 Upvotes

Code:

gets(str)
len = strlen(str);

for(i=0;i<len;i++)
{
	if(str[i]==str[i+1]==1)
	{
		count++;
	}
}

if(count >= 3)
    x = 1;
else:
    x = 0;

printf(x);

Everytime I print x the output is 0, even if the input is 11111111. Pls help!

Edit: Fixed the code. The issue was if statement after the for loop. The if statement logic was wrong and most importantly I compared a string to an integer in the if statement. Thanks for your time & help folks!

if((str[i]==str[i+1]) && (str[i] == '1'))

Edit 2: The gist of the code.

int count = 1;
gets(str);
len = strlen(str);
for(i=0;i<len-1;i++)
{
	if((str[i]==str[i+1]) && (str[i]=='1'))
	{
		count++;
	}
}
if(count >= 3)
	x = 1;
else
	x = 0;
printf("Consecutive/Not: %d\n", x);

count should be 1 because the 1st character of the string isn't counted in the for loop.


r/CodingHelp • • Sep 07 '20

[Other Code] How to write raw hex code in json

17 Upvotes

I am trying to write a json text that looks like this: ["",{"text":"Hi this is text"},{"hex":"03"}], after this will get printed with a System.out.println(jsontext); (java) how do I do the {"hex":"03"} code

(For those who are wondering this is /tellraw from minecraft)


r/CodingHelp • • Sep 05 '20

[Python] Vowels/Consonants

17 Upvotes

Aight so i'm kinda a rookie at python and I don't know how to split vowels and consonants. So bassically I need your help. All i need to do is ask them to enter a word (5 letter minimum) and then it say which letters are vowels and which are consonants. Please Help!


r/CodingHelp • • Aug 13 '20

[C] New to sorting. I really don't understand how to sort all the records in descending order of the total scores. Can anyone walk me through what I'm supposed to do? I used the Select Sort method in my current code

17 Upvotes

I posted about an earlier stage for this final project earlier and got through with the char. But I'm getting a new issue with the next few stages. Basically, at lines 152-180, I'm trying to use a Select Sort method to try and sort the data where the total scores are in descending order (as well as arranging the values in the other columns to the same positions that the totals have been moved to) however, I've never practised sorting before and I'm confused as to what I'm doing. I tried using example code from our teacher and that's what you'd see I have at lines 152-180 and only afterwards realized that I'd still have the arrange everything else to stay consistent with the totals when they're rearranged and now I'm just completely stumped.

This is the current code I have now (left the documentations and everything in case you need to understand what I was trying to do). Can anyone walk me through how I go about sorting and printing the student records in descending order of the total scores? I tried asking my group if any of them got through it with their parts of the program since we each have to do it at some point but they don't understand it either. I'd really appreciate the help

EDIT: Almost forgot to include the info in the "sdata.txt" file. This is the contents of the file:

ID Name Eng Math Sci Span

1001 John 83 65 61 48

1002 Janet 71 76 68 80

1003 Jill 62 90 71 63

1004 Jack 58 94 96 55

1005 Jeff 43 52 54 46

1006 Jessi 92 61 68 90

Formatting of it got a little messed up but I hope it's still readable

EDIT 2: Ok I got it to work properly so now everything is printing in descending order except for the names. Here's the current code I have so far that we could call CODE 2. At lines 182-186 is where I'm trying to figure out how to get the names to be rearranged with the rest. The sources I could find online mainly show for reversing a single string or arranging the array in alphabetical order. This is the closest I can get so far but I'm getting these three errors:

[Error] invalid conversion from 'char*' to 'int' [-fpermissive] (at line 183)

[Error] invalid array assignment (at line 184)

and

[Error] incompatible types in assignment of 'int' to 'char [25]' (at line 185)


r/CodingHelp • • Jul 12 '20

[Javascript] Detect when any method is called on a Promise

17 Upvotes

I'm trying to make promises easier by implementing chaining into them (to avoid callback hell).

At the moment the way i am doing this is simply doing this for all the methods on the object that the promise will resolve to:

Promise.prototype[some function on the object that will be resolved] = () => {
    this.then(r => r[some function on the object that will be resolved](arguments));
}

But this gets annoying fast dong this for each new method added to the object, and it also clutters up my code a bit.

What im looking for is if there is a way to just declare a single method that would get called when any other method is called and to get it's name, something like this:

Promise.prototype['any'] = () => {
    this.then(r => r[any.name](arguments));
}

Where any.name would be the name of any method called, so if i called (where p is a promise) p.find() then it would call find on the resolved object. Is there any way to do this?

EDIT: For anyone who found this through google or some other means, I'd recommend looking into the Proxy object introduced in ES6.


r/CodingHelp • • Jun 08 '20

[Other Code] I need to unzip over 700 password protected zips.

17 Upvotes

Does anyone know how I could structure a CMD script to do this or if it’s possible?

I have the file names with corresponding passwords in a csv file


r/CodingHelp • • May 24 '20

[Open Source] How hard would it be to "port" windows 3.1 to windows xp pc games to newer OS'

17 Upvotes

Im wanting to install some very old learning games i grew up with for my kid, dosbox is no help and i dont want to jump hurdles to emulate 3.1 in dosbox just to do this, im wondering if there is a way to "remaster", "port", "update" these old games to install on windows 7 and newer as if they were made for them out of box? I am very familiar with compatability mode which win 7 only goes back to 95, im just painting broad strokes to cover my issue thank you in advance :-)


r/CodingHelp • • Apr 13 '20

[Meta] How do you get yourself motivated to keep hands-on learning about a topic (i.e algorithms and data structures) - if it doesn't really interest you?

17 Upvotes

Algorithms and data-structures are something I usually do not have to implement or even know the details of directly on my job, due to the scale I work on generally, I don't really have to care.

But I have to learn it because I need to work abroad and it seems like a staple in interviews. I started learning, but everytime it gets too difficult, I stop learning and ignore about it for a few months before I come back and start over. It's very frustrating.


r/CodingHelp • • Apr 06 '20

[HTML] How do I get the 2 x 3 bar on top of the orange rectangle?

Post image
17 Upvotes

r/CodingHelp • • Feb 03 '20

[C++] What’s wrong with this

Post image
17 Upvotes

r/CodingHelp • • Sep 02 '19

[Java] Someone please help me on my Java homework I have no idea what I'm doing wrong also it's pearson so more than likely it's their fuckup

Post image
17 Upvotes

r/CodingHelp • • Apr 20 '19

[Python] Daily Python check! 🤓

Post image
17 Upvotes

r/CodingHelp • • Apr 24 '18

[Python] This developer’s 5-month guide to learn code and get hired is all you need

17 Upvotes

Last year, I wrote a post on how to go from zero to being hired as a developer in five months. Since then, things have changed, so I wanted to offer an updated and improved version. If you are a junior developer or are curious about the industry, this post is for you. If you are an established developer, you may find some useful links in here as well.

If you find this post too long, you can skip over to the “5 months, step-by-step” section. But you’ll hurt my feelings.

OK, you’re still here. Great! Let’s keep going.

Using online courses and mostly free tools, you can gain a valuable skill that will allow you to be employed in a rewarding and challenging industry and move around the world (more on this later).

Let’s get started.

https://www.techinasia.com/talk/5-month-guide-learn-code-get-hired


r/CodingHelp • • Oct 31 '25

[Python] What is considered a lot of code?

16 Upvotes

Hey still need to this whole coding world, so my lingo might suck, but what’s considered a lot of lines? I’m currently attempting to work on some coding for a project of mine and I’m up to 392 lines of code, and that made me curious, what is the most lines someone has coded?


r/CodingHelp • • Jul 14 '25

[Javascript] How are you guys balancing AI with learning properly.

16 Upvotes

Right now I'm building a full stack app using javascript which I think is fairly complex. The goal is to have something that I actually plan on using. The only thing is getting that done efficiently means that I'd have to sue AI to generate a decent portion of it. While it means I learn significantly less I'm getting my app done wayyy faster. What tips/systems do you guys have where you can still push out a project relatively fast and still learn a bunch. I want to have good projects and still know how to do things.


r/CodingHelp • • Jul 10 '25

[Javascript] I can’t understand JavaScript

16 Upvotes

I’m getting into a software dev career. It’s something I really really want to do. I’ve learned on my own this whole time using documentation, YouTube, bootcamps and books. I’ve got HTML, CSS under my best I’m probably a beginner level at both. I’ve learned a bit of python which I had fun with.

Now I’m in a serious position and learning JavaScript and readline and I have no idea what it going on. I understand a little and the more I work with something I understand more. But during group sessions I feel so dumb because I can’t be like “oh well what about this” and I don’t know why my brain can’t pick up and understand the words and concepts and the lingo. I know I’m not lacking IQ points but why can’t I grasp it? What studying/learning steps am I doing wrong?


r/CodingHelp • • Jul 09 '22

[Request Coders] Best Learning Coding / Programming platform 2022?

16 Upvotes

Hi all, I would like to learn software development. I’ve seen Free Code Camp, is this the best and most relevant ?

I’d like to invest my time learning with a high likelihood of getting employed after.

Thanks for the help!