Learning programming and actually being productive

sup Sup Forums, im suffering from depression because of this shit, i've been learning basic programming such procedural programming and even got to OOP basics and still haven't made something that actually is satisfying ffs.
>mostly just uni homeworks that are related to math more than FUCKING PROGRAMMING
I know basic C but ffs i cant make some basic shit with it
I tried python but i dont even know how to fucking start on being productive.
>might dig in into web dev
i just want to be able to make something like a simple CLI app or maybe automating bots or some shit that actually makes me feel like i've done something, maybe even web apps. or small TUI programs.
i feel so desperate because i can't make anything.
please help me get productive, recommend me books. some simple projects to follow and make something like them
ANYTHING TO FUCKING STOP BEING DEPRESSED OVER BEING A FUCKING USELESS FUCK WHO CANT DO SHIT
i wanted to try go lang but it seemed a complicated, felt like doing python but too lazy
c# and java are just too much for me.
maybe i need to step my ass into python
i dont know what to do.

Other urls found in this thread:

github.com/Rapptz/discord.py
youtube.com/watch?v=RIz3klPET3o
projecteuler.net/problem=3
johnkcurriculum.blogspot.com/
youtube.com/watch?v=PwuIEMUFUnQ&t=5s
twitter.com/SFWRedditImages

and yes i can do recursion, trees, linked lists and do stuff with files.

I think you need psychiatric help first before you go and be "productive"

believe in urself

how come?
>i think you are right on that one for sure but hear me out.
i realized i have no creativity no talent to do any of the "common" art stuff
been into computer-related stuff since i was 11 but it was mostly some basic stuff *hackerman* and reading about it online.
once i got to learn about programming i thought i can do some stuff with it, apparenty that's the only thing i can be "productive" in i guess.

Here's the thing. Reading large "Books" of x programming language(s) won't get you programming, though they help you understand some basics.

Most of all, learning to be a productive programmer is actually learned from actually writing and experiencing it. JUST DO IT coding and researching and being obsessed with code.

It's like writers block, you just got open the friggin text-editor or IDE and code shit. Code whatever shit you can think off, write shit that does weird stupid shit that does something, and when you hit a block in the road, DONT stop and move onto something like video games and meme surfing. Just keep googling for answers to the problem on your hands and think your way in and around it.

TL;DR

Just coding whatever bullshit you have in your mind to do makes you a productive programmer in the long run. It's like practicing baseball, keep swinging the ball for hours a day, likewise code small studio shit hours a day in a language and DONT STOP simply because you can't figure out the api or can't find the right Google answer to it.

Also read other people's code like just by browsing github for stuff or whatever. That helps a lot too. It's just like sports training for the mind: PERSEVERSE, KEEP TRYING, DONT GIVE Up. Trust me, I've been in your position and worse because my internet is shit when I need an answer to why x error is there and I'm bad at math and logic and my motivation+determination sucked. But keep coding and coding and coding your ideas out and you'll eventually get there.

Above all, seek God through the Bible and see what He's all about. He's worth far more and is way more fulfilling than coding your dream project to fruition.

It takes a long time before you can produce something worth anything. That goes for almost anything that is worth learning and not just programming. You'll be able to make things more valuable to you and other people naturally, obviously that's not possible right now. Perhaps you're expecting results too quickly, just continue with it and it will be a natural process.

i do suffer from the same stuff like you, bad at meth/logic and my motivation sucked af. i really dont know, i keep getting stuck everytime and end up bailing out,
let's not turn Sup Forums into reli/g/ions but, apart from all the stuff you said. i prefer to believe that god exists and that's it. point blank, focus on your life man,

Are you OP?

I mean, i know you're right. but i havent made a single thing that i'd be proud of in my entire life now beside just focusing on my studies. kinda sucks ma dude.

OP here, yes.

> above all, seek god

Aaaaannd credibility immediately lost.

I think you might just have high goals in life and the desire to over achieve which is a great thing. Whether you have achieved something or not I wouldn't get too caught up in it. Most people achieve nothing their entire lives because they don't even care enough to try, at least you do.

user, there's probably some underlying issues deeply buried in your mind that cause those problems. See a professional. I had similar issues. Seeing a psychiatrist doesn't magically solve every problem in your life, but it will help you stand on your own two feet and get a sense of direction.

I live a muslim society, 3rd world country. never was a true muslim because i never looked up to it, by the age of 14 i started stressing about religious , by 16 i realized islam isn't working well with my mind. took me 2 years to convince myself that it's okay if i was wrong because i was the individual. I never tried to read about any religions, i never tried to back myself with proofs, i never tried to attack any religion. i just chose to be busy with life. kinda grateful that life gave me little access to the things i aim to achieve , which kinda made me "live" even tho it sucks. i still prefer it over non-existence. I also, try to accept the idea that if i was wrong, i'll accept whatever happens to me because i chose what to be. i hope this helps you buddy.

Ok so here's some tips when you get stuck:

1 Google (obviously, but also try Google different approaches to your problem, example: like instead of "variable x won't print to screen" try posting the compiler error output to google for)
2. Learn about computer science in general. That has REALLY helped me. Don't be in a hurry with your code and don't be distracted by fun-stuff (memes and video games) just keep delving into the depths of the knowledge of how computers work.
3. Learn how compilers and linkers work, and learn programming theory, and read about memory management
4. Use a Text editor and compile your software from command line instead of using an IDE (IDEs baby you so much that it makes it hard for beginners to meaningfully learn as they code along). Learn how software compiles at command line. LEARN more and more and LIKE IT.
5. LOVE coding by learning more and more about history of coding and how coding fundamentally works. If you don't love coding you will never make it in the long run. Learning to code should be as fun as video games (and it is once you get an amateur hang of it)
6. Don't hurry. If you need to take a break, and don't be hard-pressed and discouraged that you had a block in the road. Blocks in the road are so common even to advanced devs. And when you take the break, use the real profitably by learning more about computer science or techy stuff instead.


And as I always say at the end of in addition to my advice, seek God.

Are you from Afghanistan, Bangladesh, Pakistan or India?

>north africa
>*-stan

I'm really starting to wonder if i'm not cut out for programming.
It's the interview questions/problems that always get me.
If I have the time I can answer just about any problem given to me, but when ever it comes down to a time limit, I can never seem to pull off the answers quick enough.
I feel like I've practiced a fair amount. But speed just doesn't come to me.

Anyone have any ideas how I can improve so when a question like "Create a method that returns the number of four letter words in a string in 10 minutes or less." I don't struggle to find the solution?

Write a CLI text adventure or something. Write a chrome extension to help you take notes. Write a graphing program. Write a data parser/viewer. Write a roguelike and sell it on steam, it well sell if you draw some good indie graphics. Write phone apps for things you wanted to do. Wherever there's a simple software you want to use, try making your own.

1,2,4,5 are in basic things in my life now.
i do enjoy coding more than gaming (which i stopped) as well, that's why im trying to get better at it.
as for the advice, i do seek god everyday. it's just the way i do is might be different than yours

the first program I wrote was a clicker bot that sampled two pixels on a screen and then clicked somewhere depending on what it saw

it was a simple roulette martingale bot written in auto-it.

took me a whole day, quickly discovered the whole strategy is bullshit, but it was a little program that was complete, and worked.

do some small little shit like that to get your confidence back.

I'm just a college student for now, but the way i get that stress out is by putting a timer on my regular revision days, put some calm music since i like ambient and try to solve whatever exams i have on hand before the time runs out. good luck in your life ma man

1) Pick a form of program that you would be most excited making (app, desktop program, video game)
2) Think of the most simple but interesting idea you can (alarm clock app that opens some dumb video on yt you like, flappy bird or smth)
3) Just fucking do it. Google everything you think is an obstacle.

Then keep doing this until you are good at it.

desu you only 'learn programming' by being in a job where it is necessary, or a contract
where there is a real external need & you must produce

...

be productive and write a script that goes out and gets my EC2 snapshots, decides if they're older than 14 days and then deletes them

you can use python on lambda`

I'm thinking of making a simple CLI text editor, i'll try to use python and (n)curses, i know how ncurses works because i learned the basics with C back in summer, however i dont know how a CLI text editor works/is made. but i'll do some googling. if you know a better alternative to python/curses, i'd love to know so. still thinking about termui with go lang it seems like a nice C-like language and easy to use with good procedural approach that's easy for beginners like me.

Can someone tell me what makes my C# code generate a index out of range exception?
I honestly suspect it's a error with the compiler though (working on a problem from CodeFights)
ListNode addTwoHugeNumbers(ListNode a, ListNode b)
{
List listA = new List();
List listB = new List();

ListNode curA = a;
ListNode curB = b;

while (curA != null)
{
listA.Add(curA.value);
curA = curA.next;
}

while (curB != null)
{
listB.Add(curB.value);
curB = curB.next;
}

listA.Reverse();
listB.Reverse();

// Even out the list lengths
int maxCount = 0;

if (listA.Count() > listB.Count())
{
maxCount = listA.Count();

for (int i = 0; i < maxCount - listB.Count(); i++)
{
listB.Add(0);
}

}
else
{
maxCount = listB.Count();

for (int i = 0; i < maxCount - listA.Count(); i++)
{
listA.Add(0);
}
}



// Add numbers
int carryOver = 0;

List newNum = new List();


// Test code
Console.Write(listB.IndexOf(0));
Console.Write(listB[listB.IndexOf(0)]); // Exception occurs here. Value is verified.

return null;
}

>Learning programming
Why would you want to learn one of the most pajeet soulless professions out there?

Learn something actually useful like another country's language.

gtfo
this thread is about another subject

bruh, i study that shit and im looking forward to have a job that's related to it.

Good, fedoras don't deserve solid advice

hmm i like to write a ton of functions that are useless and then i combine them to make something glorious

also, depression is for faggots

I'm in the same boat as you OP, an idea : discord bot, use python since it's pretty good and also since the doc is pretty sweet.

github.com/Rapptz/discord.py

good luck

Python is easy if you want to make a UI.
Try to make a copy program. Bonus points for additional functionality like compression and packaging.

>Religious people can't be depressed
Also your tl;dr is longer than the first half. Other than that you have some decent information in there

If i were in your shoes i would learn python and then you could do useful programs in the fraction of time required in C. But because i value general knowledge too i would try to play with pointers in C in order to have a better understanding of how they work as they are the most powerful part of C.

Pick the easiest and most accessible language and make something with that. Don't worry about languages or frameworks, just choose something.

Languages like C/C++, etc are harder to get into. Something like Python has a lot of easy libraries that can help you a lot in getting off the ground.

The hardest part of any project is getting started and it doesn't help to ruminate over the perfect tool rather than just getting to work.

awww pooor little white boy :(((

Here's an idea:
-Learn all you can about programming.
-Without inspecting code, create a clone of line-ride.

Here is line-rider:
youtube.com/watch?v=RIz3klPET3o

All you will need to know is:
- Newtonian pysics
- A line drawer
Thats it :^)
Good luck.

It's hard to think of an appealing project that seems to fit into your skill level isn't it; other than toy programs.

The way I see it all the math shit is making you a better programmer you just don't know it yet
There's three aspects
1.learning the properties of your language (easy in c)
2.learning the properties of libraries for your project (pajeet tier)
3.algorithms and good practice (hard)

Uni is doing 1 and 3, but they can't do 2 really because they don't know what project and programs everyone wants to make

So think of a project, try without a library as far as you can, and then find a library you need and learn it

OP i have a solution:
Just start coding.

Here's something simple for you to do right fucking now:
>Write Fizz-buzz.
Past that point to just a thread asking for practice problem suggestions, and then try to tackle said problems. The way to get acquainted with a computer with your hands.

sounds like a hard project and ncurses is total shit and will drive you crazy
I'd start with some toy tier programs for things you're interested in

Similar to text Editor I'd say program that counts number of functions and structs and how many times they are referenced in a .c file

>chad detected
gtfo chad, go fuck stacy or something. This boardis for 120+ IQ, not 30IQ tards like yoruself.

Whatever you do, don't get into webdev. It will tip you over the edge.

Since this is kind of a programming help thread, could I get some hints on a problem? I'm doing the project Euler problem 3 which basically asks us to find the prime factors of a very large number. It's been quite some time since I've done any factorization, so I'm wondering if I could get some hints? It makes sense, to me, that I only need to check up to the square root of the number since anything bigger can just be broken down to a number smaller than that. Is that right? Are there any other tips anons can provide for me to look into? I'm doing it in C, which might be a mistake
projecteuler.net/problem=3

you don't need creativity and talent for basic competency in 'art'. Not to mention both of those just come with practice. People being 'born' creative is mostly a myth. Sure some brains are going to think in more novel ways than others, and everybody has had different life experiences that influence their current thinking, but there is much less a difference between humans than people would have you think. The only thing is that these things take years and years to learn and develop. They're a long-term result of your daily habits, which is why people who are only willing to put in a week's effort never get anywhere and declare it 'impossible for me, I'm just not that type of person'.

I don't know what you're gonna do with it, but if you want some basic understanding of (good, real) art, browse here, John K is entertaining as shit: johnkcurriculum.blogspot.com/
The site i geared toward animation, but composition and color theory would probably help you out. Of course, then you'll get real sad at the fact that everything looks like shit nowadays.
And if you really like it, go read some more advanced books about it.

quad 7.
Holy truth user.

>I'd say program that counts number of functions and structs and how many times they are referenced in a .c file
That's a bad idea, I guess it would be easy to write a retard-tier one, but writing a proper one would basically require parsing the code entirely.

>I only need to check up to the square of the prime number
That's not entirely correct. Consider 21, if you only checked up to its square (~4), you'd miss 7. I'd do it like this: if your original number is N, check whether it is divisible by 2, if it is, set N to N/2, then check whether it is divisible by two again, and repeat it until N is no longer divisible by two, at which point you should try dividing it by 3, then by 4, etc, until you reach (or surpass) the current N's (not the original N's) square root. At that point, you should check whether the current N is equal to 1, if it isn't, then it's also a prime factor of the original N.
Tip: since you're checking against the current N's square root in every iteration, keep it in a dedicated variable, that you only update when you change N, since otherwise you'd have to calculate the square root in every iteration, which would lead to bad performance.
Doing this in C is not a bad idea, it's not like writing a couple for loops and if-else statements is any harder in C than in any other language.

Right. I was more thinking checking for roots with some library or another and since I don't have auto complete or whatever else to look up C library functions it seems like a pain. Thanks for the tip

Yeah I didn't mean to imply that you should write your own square root function, there is a built in sqrt function in math.h.

yeah definitely. As an example, for this number, as you can see in the link, the square root comes to like 7.13547422e +15 or something. I'm not entirely sure that's accurate so I'm going to fiddle around with smaller numbers first

Some projects that might interest you from the top of my head:
-irc/ftp server/client (socket programming)
-game programming
-game hacking
-trojan with custom binary protocol
-remote shell
-encryption algorithms
-wifi hotspot

You're probably fucking something up, because the square root of 600851475143 is 775146.099225..., and not 7.13547422e +15. Pic related works perfectly for me, it prints 775146, after it converts the double to an integer. You're not using a double to store n, are you?

I was using double to store the result. I've updated it up be a long long instead and it displays reasonably now

This may seem a bit meme'y but read SICP. SICP has examples of using programming to solve problems in mathematics in ways you'd never expect. Since it seems you keep on winding up doing lots of math in your classes I think that the combination SICP's examples and what ever you windup learning in class should give you inspiration for programs will be satisfying and useful in your course work.

SICP's greatest strength isn't in teaching you to program. It's teaching you to solve problems using programming!

Did you write 7.13547422e +15 from memory? Because I was really fixated on that, since that is incorrect, but I couldn't reproduce your error.
Anyway, if you're worried about precision, 600851475143 can be stored in 40 bits, and double has 52 bits of precision, so you should be fine.

Where do you code on a PC? Like what do you open to start writing code on Windows or Linux?

Nah, I didn't write it from memory. I just figured the decimal points and the e+number would convey my point successfully and it did. I'm using long long since that removes all decimals
In Linux you install the GCC compiler, for writing C code, then you open a text editor and begin writing. When you're satisfied you compile it (with a terminal command) and run it through the same terminal.

My Autoit nigga. The first (proper) program I wrote was a GUI for a popular Diablo 2 bot which was also written in Autoit. It was such a fun, practical project, and easy enough that I could see progress happening frequently.

>Reading large "Books" of x programming language(s) won't get you programming
Not even when I am doing the exercises? I mostly pick books because of the exercises.

Write a traffic simulator using threads and monitors, then implement an UI that will let the user see the progress of each car, there must not be any collisions
If this doesn't get your confidence back at least you would finish my homework and feel a little productive

by the way there must be 12 different routes

>windows
>Install zinjai or devc++ and then you start
>linux
see

Here's the thing,
when we tell (your) bitch-ass to stop studying and start programming, that's exactly what you should do.

One of the biggest problems with people getting up in this industry is they have nothing to show for it.
I'm not even talking a useless cuck like yourself, no. I meant even people who have degrees but 0 real-world projects. They. Just. Can't. Program.

They can talk to me about the knowledge behind a function/loops/etc but they can't execute it from scratch. If they do it's with very retarded baby examples that are useless either way.

I come on Sup Forums every day and every day it's those shill threads about babyprogrammers crying. I seriously spend near 8 hours/day on my projects and just watching your shit ass failing.

Stop fucking reading and start fucking coding and FAILING and RESEARCHING and LEARNING you fat piece of shit. Stop paying attention to what Sup Forums says and reccommends about books, your sorry ass doesn't need more books any more than your belly doesn't need Big-Macs. Can't you fucking think for one fucking second? If you're gaining knowledge but can't create, what COULD be the problem besides practical learning? You dense motherfucker.

Why don't you set goals for yourself? Why not work on a main big project while reading your first programming book? Implement that knowledge slowly on your main project as you read each chapter? //Create// something new after each chapter, however small.
Do research, understand the direction those languages take you and what they create. USE that as information for ideas to create similar projects.

My god, there's no saving some of you.

I suggest building a work ethic. If you compulsively play on the PC every time you sit down at it, then either turn off the internet, uninstall the games, or get a second laptop that has neither internet or games on there anyway.

If you still cannot get going, then try and find some manual labor jobs that have have you up and doing things at certain times of the day, doing the same thing. This way, you will develop a sense of how you should work, since while it is manual labor, the conclusion is the same as it is in coding; it requires you to just do it. If you dont do it right the first time, try again until you do. If you can't saw that fucking chunk of wood right, then get a new chunk and start over - just like how you should with programming, if you suck that much ass at it.

the best advice I can give to debugging programs is to regularly build and compile the program after every function or loop you make, so that you can continue from there. I used to stand in your shoes two years ago and like others have said, it just came down to an attention disorder for me. Though they wanted to put me on adderal (which I did not accept), knowing what the problem was, was enough to set me forward. I suggest you to try the same.

Who is Jon Galt?

CUriuously, I just started reading that book.

for c++ I use an install of codeblocks that has the GCC/GNU compiler. If you don't even know what sort of IDE to use, then you have yet to even start running this marathon

>dont do c++
On the flip side, learning C++ early/as your first language will make learning any other language 100% guaranteed easy.

The only thing that is really actually hard about C++ is learning the memory management

this and

follow this: youtube.com/watch?v=PwuIEMUFUnQ&t=5s

you learn C++ while doing a fuckhuge project, it's not the most orthodox way but it's great
don't bother yourself with linux and that, after you've mastered C++ you'll learn all the "productivity" tools in a week or so.

Go for it, and do fear shame if you can't do X homework, watch the solution, try to come up with your own implementation and keep moving on, when you finish you'd look back at laugh at how foolish you used to be.
After finishing all the videos of this guy, grab some book con C++ 17 standard and some books regarding algorithms and the like and whatever calls your attention.
This should take you ~4months if you work every day

that shit is way too much for anyone who hasnt been programming for at least a year

It's a good book, don't take the philosophical aspect at heart (just the necessary) other than that, it's the greatest train related literature ever.
Great book.

so, i think i got it. my result says the final prime is 6857, if you didn't end up doing the problem i'll go look it up, but if you did I'd love to know if that's right or not

GET ENTHUSIATIC ABOUT PROGRAMMING, and dont let yourself get drawn down if you at first dont succeed. Inevitably, you will fail at programming, and that just so happens to be one of the best ways to learn.

socket programming is extremely basic

a tcp server is like 10 lines

This

The Bible has way more interesting stories than programming books. I believe people are either born to be programmers or not. If it was so easy then fucking everyone would program.

the results:
#include
#include

int main(void){
//unsigned long long temp = root(600851475143,4);
//unsigned long long testInt = 600851475143;
long long originalVal = 600851475143;
long long testInt = originalVal;
long long currentSquareRoot = (long long)sqrt(testInt);//limit of the loop as an integer
//value is 10
int divisor = 2;
while(divisor

He isn't white, he's North African

>born programmers
I don't think anyone is born a programmer. The programming workforce is so diverse (mentally) to the extent that getting a programming job is becoming the new blue collar / intellectual-manual labor-slave-labor

And yeah, the Bible is great. The best thing about it is that it's also True.

Keep going. It gets better. And yes do python and start working with some fun APIs