a self-improvement journey: learning programming (starting with the CS50)

JavascriptPufferfish

Supreme Member
Joined
Sep 13, 2019
Messages
1,381
Reaction score
2,056
hi, I have been interested in programming for a long time, but never gave the jump. i learned a bit of AutoHotkey a few months ago, but i have now decided to start learning more seriously. for that, i looked around, and found the CS50 (a Harvard introductory class to computer science) to be a great, challenging course for a solid foundation. i convinced my younger brother to take it with me, as he is a student somewhat lost at what to do with all this unexpected free time, and i believe programming is one of those skills that can help him no matter what life path he chooses. while it may be a little late for me to pursue it professionally (i am in my mid-twenties, close to getting a college degree that probably won't be all that useful), i think it will blend greatly with any IM project i may come up with, and freelancing with some programmatic knowledge would probably pay better than the average job on my country if i ever need to go that route. (average salary on my city is around 180usd and going down quickly thanks to inflation).

so we will start with CS50: it's around 8 weeks of general formation with C and some python (should actually take a little less), plus choosing a "track" and delivering a working project. tracks are web, IOS, android, and games. i will probably go with android, as i have a little idea for a few easy and useful apps, but i also want to do web after that. my brother will probably go with videogames, but we may change our minds at some point. this journey will document, initially, my opinions on CS50, as well as my advances and the stuff i learn in general. since i work, i will be dedicating around 2 hours a day to this, sometimes more, almost never less. after CS50, i will document here the projects i tackle on, sources from when i learn, and cool little things i may do.

my long term project, and a major milestone, is making my own personal simple social network bots (especially Instagram), as the ones on the market right now are notably expensive. i think TikTok has shown us that the social network landscape still has a place for new contenders, and those with decent programming skill (or good initial budget) will once again be there to reclaim the virgin new frontiers and spam/repost them to death. i would also like to learn making my own proxies buying a certain marketplace product (i almost pulled that trigger, but money is drying up here so i have to prioritize stuff that probably will give me immediate returns over cool but long term inversions), as i believe it would have a great synergy with this skillset.

the topics i find interesting are bots, scripts, automation, machine learning, and to a lesser degree cybersecurity. but finding something interesting before getting your hands dirty is very different to still finding it interesting after having some experience in the field and knowing what learning about that topic truly entrails (happened me with my choice of career), so i will just put my efforts on creating a decent foundation and working on the included problems from CS50 for now. while i am not sure until when i will update this thread, at the very least i intend it to be a decent read for people wondering what learning programming from 0 looks like. that's all for now. a little side note, if you have some free time and the idea doesn't bore you to death, learn a little bit of AutoHotkey. It's rather easy to start, and you can do useful stuff very early on. and discord community is incredibly helpful.
 
So you have picked the Android track, but your interests lie with Bots/Automation and Machine Learning. Your second track is web development.

From what you have said I don't think Android is the right track for you, web maybe as you will learn about how requests work and also being able to see what javascript is doing on pages where anti bot measures are happening.
 
So you have picked the Android track, but your interests lie with Bots/Automation and Machine Learning. Your second track is web development.

From what you have said I don't think Android is the right track for you, web maybe as you will learn about how requests work and also being able to see what javascript is doing on pages where anti bot measures are happening.
thanks for the advice. i thought "web" was more about web design (which is not a priority for me since i already use wordpress decently enough); but what you say makes it sound a lot more useful to my goals. still, i don't think i will give up android, so i am pretty sure i will end up doing both. while my interest aligns more with web as you say, i want to have some flexibility on my skillset. that doesn't mean i want to master everything (nor CS50 is the way to that), its just that i want to be able to understand and do a little bit of various things, before going all in on the knowledge i will need for my goals. just as knowing the basics of wordpress can open a lot of doors, i think knowing the basics of mobile app and java may open some possibilities too.

offtopic, but i have a friend who made quite a nice number with apps 5 years ago or so. it was game code he bought for dirt cheap, he added some UI or something like that, published them in google play, and auctioned for around-100-200usd. he kept the most profitable ones too. i think it was way easier to get traffic for apps back then.
 
update 1: It's been around 10 days since i started the cs50. my brother is currently crying himself to sleep. Mario wrecked us both. leaving aside the syntax difficulty that we will soon overcome with enough practice, it seems we are lacking quite a bit in the logic and mathematic department. using the variables and loops in a clever way that outputs your desired result is a talent/knowledge we are currently struggling with. i took a few solutions from GitHub, and spent a good while looking menacingly at the "for" loops. took a pen, and wrote down how each variable progressed in each loop, and understood what the code was doing. but there is a rather big difference between understanding an answer and being able to reproduce it without references. so i will be revisiting Mario in 1 or 2 days, to try to do it without looking at answers. on the other hand, i managed to do the "cash" problem all by myself. mom was quite proud, she even cooked empanadas. "cash" was certainly a little easier, but i think both are actually very easy, its just that you have to have the appropriate knowledge.

C:
#include <stdio.h>
#include <cs50.h>
#include <math.h>

int main()
{
    int cents_owed;
    float dollars_owed;
    do
    {
        dollars_owed = get_float("Change owed: ");
        cents_owed = round(dollars_owed * 100);
    }
    while (cents_owed <= 0);
int quarters = (cents_owed / 25);
int quarters_remain = (cents_owed % 25);
int dimes = (quarters_remain / 10);
int dimes_remain = (quarters_remain % 10);
int nickels = (dimes_remain / 5);
int nickels_remains = (dimes_remain % 5);
int pennies = (nickels_remains / 1);



printf("%i quarters\n", quarters);
if (dimes != 0)
    {printf("%i dimes\n", dimes);}
if (nickels != 0)
    {printf("%i nickels\n", nickels);}
if (pennies != 0)
    {printf("%i pennies\n", pennies);}
}

this is what around week 0 and 1 (5 hours of cs50 videos) plus some inefficient struggling looks like. after doing it i compared with answers from GitHub, and the use of "_remains" is certainly not the most elegant answer. when stuff actually compiles, even if it ends up not doing what you wanted it to, its a happiness that cant be put into words.

as for my younger brother, i will try to help him, but he is the type that gets frustrated rather easily, so if he gets too tilted, i may suggest him a different resource, like learning python directly from some code camp. c syntax can be frustrating. at some point, we all have to bang our heads against the wall of frustration until we wreak it, but i don't think that's the only viable way for beginners. everyone has different needs, maybe there is a resource more suitable for him. whatever, we will see.

the main takeaway from this initial period is: code every day at least a little (i didn't do it and suffered from it, lesson learned), don't let yourself get dragged down by frustration, keep your long term goal in mind, code with a "2 hours of rain sounds" video as background.
 
Back
Top