Learn Programming

Subscribe to Learn Programming feed
A subreddit for all questions related to programming in any language.learn programming
Updated: 28 min 18 sec ago

Online Accredited Courses.

29 min 58 sec ago

Hey there. My question is... are there any online courses you all know of related to programming and computing that are actually worth something if I take the time to complete them. I am teaching myself Python right now but I have time to take some classes that don't cost much. Any ideas?

submitted by /u/PythonGod123
[link] [comments]

Python tuple, new takes 2 positional arguments but 3 were given

39 min 38 sec ago

Tuple is defined like this

tweetAndTime = collections.namedtuple('tweet','dateTime')

Data for the tuple is handled like this

for dataPoint in data: Strtime = dataPoint["timestamp"] tweetTime = datetime.datetime.strptime(Strtime, "%Y-%m-%dT%H:%M:%S") tweetToBeStored = tweetAndTime(dataPoint,tweetTime) times.append(tweetToBeStored)

The error hits on tweetToBeStored assignment

"TypeError: __new__() takes 2 positional arguments but 3 were given"

I've seen this error pop up with object methods before, but not with tuple declaration. Any idea what's up? dataPoint is a tweet object with fields, tweetTime is a datetime object

submitted by /u/rektourRick
[link] [comments]

functional vs imperative vs object oriented vs declarative?

49 min 12 sec ago

so, just a quick opinion question, a little note on the flexibility of python. what do you prefer in the STYLE of coding. now i know python is inherently object oriented but it is, as far as i know, a very flexible language to work in.

i personally have been following free online tutorials and such, and have mainly stuck to OOP, but upon reading i have expounded my knowledge and discovered there are more than one way to skin a cat. which are you?

with that being said, my question is... what is your personal preference when coding in python? functional vs imperative vs object oriented vs declarative?

submitted by /u/pythonic-nonsense
[link] [comments]

Should I move to java or stick with python for now?

1 hour 5 min ago

I'm a beginner, I learned python as a first language, I understand the while/ for loops, conditions, variable scope, classes/objects... ect but I don't really "feel" I learned how to actually program or took a strong grasp on the overall concept of programming, just construct some useful functions and small scripts. My main goal is to become an android app developer.

So, should I start learning java or go more in depth with python since I already started with it? The reason I'm asking is because I've read many advises to start off with python as a first language instead of Java cause it's a bit more confusing for a beginner, but when they say "start with python" do they mean to just learn the syntax? Sorry if this sound complicated and odd.

submitted by /u/SoakySocks
[link] [comments]

Good resources to learn shell script

1 hour 8 min ago

Hi everyone, I'm self studying to be a sysAdmin in the near future, and I want to improve my skills with shell script, I already know the basics but I am out of ideias how to go to the next level and start creating scripts to automate stuffs. I am already familiar programming languages with JavaScript functional programming and python.

*Sorry if something is wrong, not a native.

submitted by /u/linkbrbr
[link] [comments]

My char* gets corrupted after adding { } how can i fix this ?

1 hour 16 min ago

It should always input "Windows 7" however after i use{} it gets corrupted. How can i fix this ?

Main : https://justpaste.it/1fvw7

Aplikacja.h : https://justpaste.it/1fvw9

Aplikacja.cpp : https://justpaste.it/1fvwa

SS to bad result : https://imgur.com/a/kQMcN

submitted by /u/Foucz
[link] [comments]

Learning algorithms - by book or courses?

1 hour 17 min ago

Do you think it's best to learn primarily by books or by courses/lecture videos? thanks

submitted by /u/RegretlessStrike
[link] [comments]

Need to make my program user friendly for my workplace.

1 hour 17 min ago

I created a program in python for my company, it's a basic program that reads a text file that we copy and paste from an excel spread-sheet, and then adds up numbers from the file. I have little experience with coding professionally. To be more clear, I know how to build a program correctly, but I want other employees to use my program. Some of the people who would be using the program have no more than a high school degree. I honestly expect them to get overwhelmed with seeing a big 1,000 line block of code, having to save text-files in the correct locations, and having to press f5 to run it. It sounds trivially easy to teach someone how to do these things, and admittedly, it is easy. But I find that people in the real world are not interested in learning anything that looks remotely difficult.

Is there any way I can run my program in a more user-friendly environment?

submitted by /u/anooblol
[link] [comments]

What math is necessary for someone interested in pursuing a career in Artificial Intelligence?

1 hour 22 min ago

I have always been fascinated by math, but have never put in the work necessary to understand it. I am going back to school to pursue a CS degree next semester and I am trying to get a jump on things so I can test out of some classes.

My dream would be working to push the boundaries of what is possible and create AGI, but anything in the field really fascinates me.

Right now I am set up to start learning Trig on Khan Academy, but then I realized I should probably check in with some smart people before potentially wasting my time.

I know I'll need stat, calc and phsyics but what should I learn before those? I am good with basic algebra, and I've managed to create some basic pathfinding algorithms with my little knowledge.

I'm basically just looking for a starting point.

Thanks for your time.

submitted by /u/moonsout_goonsout
[link] [comments]

Question regarding Google Drive REST API and Powershell

1 hour 34 min ago

I'm writing a powershell script to upload csv files to my google drive. I tried two approached from Google's site.

  • Using the simple upload: The problem I'm having is the script uploads the file to my base drive folder. However it does so without any extensions and names it Untitled, and I cannot specify the folder I want to upload it in.

  • Using the multipart upload: I could not figure out how to give the file a directory path and the file it created got rid of the csv formatting and inserted all the values in a single line.

How do I do the multipart upload? Any help is appreciated. The code I used for the simple upload is:

$uploadrequest = Invoke-RestMethod -Method Post -Uri $GUploadUri -Headers $GUploadHeaders -InFile $File submitted by /u/nidschit
[link] [comments]

Swift Programming Chats?

1 hour 52 min ago

I've searched, failed somewhat. Anyone know of discord, Skype, etc group chats for Swift programmers? Beginner here learning with Apples Intro Course. Absolutely fascinated and loving it.

submitted by /u/Golfabrad
[link] [comments]

[Java] Simple palidrome method is returning false when one letter is capitalized, not entirely sure why?

1 hour 55 min ago
private static boolean isPalidrome(String word1) { String reversedWord = new StringBuilder(word1).reverse().toString().toLowerCase(); if(word1.equals(reversedWord)) { return true; } else { return false; } }

The above is code I wrote to check if a word is a palindrome. However it returns false, even after I convert it to lowercase. However it does work, but only if I convert the word to lowercase before passing it to the isPalidrome method, and removing the the lowercase conversion there.

I can only assume this has to do with how the string is stored in memory? But I don't fully understand why. If someone could explain why, I'd be very great full!

submitted by /u/AudioManiac
[link] [comments]

Learning CS while driving

2 hours 17 min ago

I spend about three hours on the road for work a day, sometimes more. While I know coding is the most effective use of my time to learn how to code, can anyone recommend any audio learning resources you have used yourself that might break down concepts and ideas in computer science or programming that I can learn about during my commute?

submitted by /u/rividz
[link] [comments]

Want to make a simple website

2 hours 38 min ago

I have been learning basic html,css, and javascript for the past few months and have worked a little with python. I know that to learn to code you have to start coding. I want to make a simple website that takes in parameters for a team and a number and then sends out a players name that corresponds to the jersey number. I know there will have to be some backend production maybe with sql and some frontend to design the interface of the website but I am not sure where to start. First post on here thanks.

submitted by /u/Always_-_learning
[link] [comments]

Where can I learn about this specific subdomain of Natural Language Processing?

2 hours 41 min ago

Hi all! I'm working to achieve a specific task which is language-based, and I would like to know if anyone knows anything about extracting statements from text.

An example: given the text "the lioness hunted on the savannah for her daughter", I would like to extract something like

"There is a lioness"

"There is a savannah"

"The Lioness is hunting"

"There is a daughter"

"The daughter is a child of the lioness"

Obviously not from the words themselves, but I'm working in a very specific context where it is easy to construct surrounding heuristics. Finding nouns is the obvious first step, but is this kind of thing extensively studied? Does it have a name? Are there books?

submitted by /u/Krexington_III
[link] [comments]

API connection limit question

2 hours 45 min ago

I am working with an API that has a connection limit. I am trying to avoid hitting that limit as they will revoke access if I go beyond that limit. The limit is 20 simultaneous connections.

To use the API, I basically just call an endpoint with login credentials, and they return the data that I need. Does this mean that If I have 21 users, and they click a button that makes that request, ive already gone over? Is there any way to prevent that?

submitted by /u/csqu
[link] [comments]

I want to build a Windows 10 app which can be both UWP or MSI deployed via SCCM

2 hours 58 min ago


I'm new here!

I am on a journey of learning how to program for Windows 10, but the end product must be both UWP Store compatible and available as an MSI/EXE for mass distribution, so is there any specific tips I need to learn or avoid at this stage before I've written a line of code?

submitted by /u/SandStorm1863
[link] [comments]

Is it wrong to reuse someone else's code when you are learning?

3 hours 19 min ago

As I dive into Javascript I have a hard time understanding why something works so I will just Google it and fiddle around with someone else's code to try and get a better understanding of how everything works.

Is this generally frowned upon or is it actually a good way to go about learning?

submitted by /u/ArtisticMind_
[link] [comments]

Should I start learning computer science by myself or should I take a class at a local community college?

3 hours 20 min ago

I get basically one free class a semester because of my scholarship, and I've been interested in computers ever since I was a kid. However, when I took a computer science class in high school (they taught Java) I struggled. Now, I want to see if i should go back to it to see if I like it. The college offers intro to computer science c++/Java. Do you guys think I should start teaching myself or should I utilize this free class I can take?

submitted by /u/1inchwonder69
[link] [comments]

Best way to sell any software as coder.

3 hours 30 min ago

I worked as freelancer for more than 4 years. Am living from that, but has been some time that i dont want to keep working for clients.

Currently am just thinking on big projects, big softwares, just important ones and with a purpose. Not just creating, scrapers, simple softwares, etc.

I want to work on my own projects that i've got in mind. So, i started to build an store to promote my softwares. (They are very good...... Or its because i coded it.), mostly for SEO & Social Networks Services.

Assuming that you're understanding all of this simple story for most but hard for me.

I wanted to know if anyone has succesfully build an store to promote your wn softwares and if you can give me an example how did you promote your store from scratch? Or what service did you use to boost your sales?

Thanks in advanced.

submitted by /u/sourcecode_dev
[link] [comments]