Tumgik
sandycodes · 9 months
Note
it’s just frustrating lmao because i constantly forget semicolons and then combined with the one at a time errors it like goes down the list of ones i forgot.
it’s normally not that bad but if i’m already frustrated and i just want to run the program it’s just a little annoying
Hi! Welcome to the world of trying to make math rocks do things! Always happy to see a new face here
How are you liking C? It's kind of a mean language, but imo starting with a language that low level helps to understand programming fundamentals
Hope you have fun!
i really dont mind it as much as i thought i would, because i also like when things are overly specific so it sort of makes sense to me. but sometimes the syntax just really throws me for a loop, and it can bother me to try and compile code when it keeps giving me one error at a time. but its just so satisfying when it finally works that idm it.
also i think having to declare a data type before each variable pushed me to understand each one better so even if i end up hating C i think at least that was super super helpful. <3
11 notes · View notes
sandycodes · 9 months
Note
Hi! Welcome to the world of trying to make math rocks do things! Always happy to see a new face here
How are you liking C? It's kind of a mean language, but imo starting with a language that low level helps to understand programming fundamentals
Hope you have fun!
i really dont mind it as much as i thought i would, because i also like when things are overly specific so it sort of makes sense to me. but sometimes the syntax just really throws me for a loop, and it can bother me to try and compile code when it keeps giving me one error at a time. but its just so satisfying when it finally works that idm it.
also i think having to declare a data type before each variable pushed me to understand each one better so even if i end up hating C i think at least that was super super helpful. <3
11 notes · View notes
sandycodes · 9 months
Text
day 12/100
Tumblr media
(i didnt do a lot of writing my own code today just lecture notes so thats where this screenshot is from)
today is definitely the most confusing for me, as we started learning about arrays and command line arguments and im just honestly soso confused. but my brain was giving out after the 2 and a half hour lecture so i just decided to let it go and work on it a little more.
i also learned strategies for debugging, which i think will be really useful when i try and work with arrays because i think ill make a lot of mistakes lmao
8 notes · View notes
sandycodes · 9 months
Text
day 11/100
(i’ll add a picture tomorrow but i’m away from home and i don’t have my computer)
it slipped my mind to post today but i actually did get some work done!! i finished up cs50s supersection and started on the practice problems, which are way harder than i anticipated them being. however, i finished two of them and i’m about 1/3 of the way through the third one. i learned about why C makes you assign variables data types before you even know the value, and it makes sense even though it’s annoying. i also got to use my problem solving skills a bit, which is always fun <3
7 notes · View notes
sandycodes · 9 months
Text
Zoey's YouTube! 🐝💗
youtube
Just wanted to promote @zoeythebee's videos she's made recently since I have been watching them and enjoying them! They're doing a series on programming a physics engine in the C programming language~!
Now I have zero knowledge of the C language but it's still cool for me to see her trying to code and explain what she's doing! I
If you haven't already, I highly recommend visiting @zoeythebee's profile and diving into their video series! ヽ(‘ ∇‘ )ノ
The video above is episode 1, here are the rest so far:
episode 2
episode 3
Have a nice day! 🐝🙌🏾💗
55 notes · View notes
sandycodes · 9 months
Text
day 10/100
Tumblr media
today was my first day (well not technically first because i started this forever ago and only finished week 0 lmao) doing cs50!! as i said, i completed the week 0 exercises a while ago and i also am very familiar with scratch and how it works, so i figured it wouldn't be a huge deal to move straight into C. honestly, i thought it would be more confusing but it's not quite as bad as i thought yet. i like how straightforward and specific it is, even if it is a little roundabout at times.
the lecture i watched today taught me about basic syntax, function libraries (and how to create your own), conditionals, variables, loops, and some basic terminal commands <3
26 notes · View notes
sandycodes · 9 months
Text
hey guys!
it’s been a minute since i posted and i genuinely went through kind of a lot in the past month or so which just sapped all my motivation, plus i really was not loving the javascript class i was taking which made it super difficult for me to code.
but! im feeling a hell of a lot better and i want to try something different, so im going to be starting harvard’s online beginners course, cs50! (im not going to be actually submitting the projects but i will put them on github so any feedback would be very much appreciated.) i think the more classroom-like setting will give me set goals and allow me to do more working on my own and less tutorial work <3
i seriously appreciate all the support and i know i wouldnt be coming back to coding if i didnt have you guys in my corner, so thank you from the bottom of my heart :)
5 notes · View notes
sandycodes · 10 months
Text
day 9/100
Tumblr media
messing around in the console a little bit to learn about different data types in js and also wrote (copied from the tutorial) a function! i still don't really know how it works yet but im glad to be slowly progressing through these beginning parts because i am doing a lot rn and i need the easily digestible content
20 notes · View notes
sandycodes · 10 months
Text
Beginner JavaScript Projects
Tumblr media
POV: You’ve studied HTML and CSS, you’ve made some cool projects and now you’re moving on to learn JavaScript. If you're just starting out learning JavaScript, it can be helpful to have a list of beginner projects to work on in order to get your feet wet and gain practical experience. 
I’ve combined a list of 5 mini projects to be working on - some I have done myself! Don’t worry, for each project I've added a video tutorial that you could use as a reference to help with your own version of the project!
━━━ ⋆⋅☆
Basic image gallery 📸
Tumblr media
A web page displays a grid of images and allows the user to click on an image to view a larger version of it. This could come in handy when making Tumblr themes 👀
The JavaScript side: Handle the user's clicks!
Video tutorial: [LINK]
━ ⋆
Simple to-do list app 📝
Tumblr media
A web page that allows the user to add, remove, and mark items on a to-do list.
The JavaScript side:  Manipulate the page's HTML elements and store the to-do list data in the browser's local storage!
Video tutorial: [LINK]
━ ⋆
Basic calculator 🧮
Tumblr media
A web page with a simple calculator that can perform basic arithmetic operations.
The JavaScript side:  Handles user input, perform calculations, and display the results on the page!
Video tutorial: [LINK]
━ ⋆
Random quote generator 📜
Tumblr media
A web page  that displays a random quote from a predefined list of quotes each time the page is loaded or a button is clicked.
The JavaScript side:  Selects a random quote from the list and displays it on the page.
Video tutorial: [LINK]
━ ⋆
Simple rock-paper-scissors game 🎮
Tumblr media
A web page that allows the user to play a game of rock-paper-scissors against the computer. I did this project during my coding night classes! 😊
The JavaScript side: Handles user input, generates the computer's move and determines the winner of the game.
Video tutorial: [LINK]
━━━ ⋆⋅☆
I hope this helps someone, it's really good to build projects as you're learning! JavaScript can be a bit tricky towards the harder concepts so it's good to have a good understanding of the basics, project building helps with that! Thanks for reading and have a nice day/night! 💻👍🏾
[⏪ previous programming post]
338 notes · View notes
sandycodes · 10 months
Text
day 8/100
Tumblr media
life is just throwing me for an absolute loop these days, but im starting my adventure into javascript :) i didn't do a ton of coding today, but i learned about the history of javascript as well as 2 ways of running it in the browser, both in html files within the script tag and in an REPL (also one way of declaring a variable cause i think there are others but im not sure) <3
70 notes · View notes
sandycodes · 10 months
Text
i remember when we were in typography II and also editorial design I we got shown the fucking text hierarchy image
Tumblr media
and I'm seeing more and more people not grasping this concept when editing so i thought that if for some reason you haven't seen this image i probably shouldn't gatekeep it. Text hierarchy is literally essential knowledge to make yourself understood. Try to have an order in your text, investigate, test things, show your edits to people and ask "hey what order are you reading this on?" because the golden rule is that your design should be easy to interpret most of the time.
29K notes · View notes
sandycodes · 10 months
Text
day 7/100
Tumblr media
i took a break the last two days bc i was just so mentally exhausted and im so glad i did because now i am more motivated than ever. i cleaned up some of the css on my neocities site to make it easier to edit and then worked through setting up tables and forms in html and css. i know after this course i'll only have a basic understanding of them both but i think im gonna move onto either javascript or python just to keep some variety :)
17 notes · View notes
sandycodes · 10 months
Text
day 6/100
Tumblr media
im definitely starting to see why people burn out of this challenge lmfao. it didnt help that tables is about the most boring thing that i could've learned today, but im proud of myself for getting through at least one lesson, and thankfully this wasn't super difficult, i'll just have to remember the tags (also yesterday i did some work on my neocities so now the starting point of the website is complete)
10 notes · View notes
sandycodes · 11 months
Text
Tumblr media
started messing around on neocities a little bit, playing with the fonts and the colors and stuff, so here's my wip header for that site
14 notes · View notes
sandycodes · 11 months
Text
day 5/100
Tumblr media
i learned how to put a header and footer on the sample website, and more importantly for me how to format one. once i thought about it for a little it started making sense in my brain a little more, which made me happy because my motivation for today was so low lmao
53 notes · View notes
sandycodes · 11 months
Text
I think arts funding should be infinite and easily available to everyone. I think 13 year olds who only draw anime should receive funding to buy giant sets of copic markers and shitty local punk bands should receive funding for instruments and practice spaces and performance artists should receive funding for their weird and nonsensical projects
61K notes · View notes
sandycodes · 11 months
Text
why does counting start at zero in programming?
happy friday, everyone!
this post got looong, so if you're interested, click "keep reading"! and if you're not interested, you're welcome for not making you scroll through all that on your feed :]
so, i'm currently working through harvard's cs50, which is their free online intro to computer science course. i'm really enjoying it, and learning a lot, especially as someone who up until now has been self-taught, and focused more on the higher level languages.
i'm about halfway through the fifth week's lecture right now, (which is called week 4 because the first week was week 0, which really messes me up when i'm trying to remember how many weeks i've been doing this for, lol) and we're diving into some really cool stuff around pointers and computer memory and etc.
this is the first week where we've finally started covering things i've never seen at all before, and some of what we're learning is really blowing my mind! like, some of the more abstract concepts i've always had trouble with are finally clicking into place.
one little thing in particular that i thought was fun to actually understand is why counting starts at zero in computer science.
we all learn very early on that when you're trying to find the index of an element in an array, the first element will be at array[0], not array[1].
but what we don't typically learn (or at least, not when your first learning languages are python and javascript from free online tutorials) is why.
that's because in these higher-level languages, we're typically too far removed from the lower-level concepts like pointers and memory allocation, so there's no need to dive into the specifics behind this syntax. we just keep in mind that counting starts at 0 in programming, and move on. that's the power of abstraction.
but, in cs50, the first few weeks of the course are taught in c.
c is a lower-level language that directly interacts with the computer's memory. so, just through learning about some new concepts, like pointers, it suddenly clicked for me why counting starts at zero.
i thought it would be a good test of my own understanding to see if i can explain why counting starts at zero in computer science, since the explanation involves going over a lot of these important concepts that i need to know.
so, let's dive in :]
in programming, especially in a language like c, a pointer is like a treasure map. when you're using a treasure map, you don't have the treasure itself; instead, you have directions that guide you to the treasure.
similarly, a pointer in c doesn't hold the actual value of a variable; instead, it stores the memory address where that variable is stored. just like you'd follow a treasure map to find the treasure, you can follow a pointer to access the value of a variable.
let's go through some basic pointer syntax in c.
declaring a pointer:
you can declare a pointer with an asterisk(*) before its name. you can also specify the type of variable the pointer points to. for example,
int *p;
declares a pointer to an integer.
assigning an address to a pointer:
the address operator (&) is used to get the memory address of a variable. so,
p = &num;
assigns the address of 'num' to the pointer 'p'.
here, p is a pointer that holds the address of the variable num:
int num = 10;
int *p;
p = &num;
accessing the value at an address:
the dereference operator (*) is used to get the value stored at a memory address. so, *p gives you the value stored at the memory address held by p.
int num = 10;
int *p;
p = &num;
printf("%d", *p);
here, *p gives you the value of num; so '10' is printed to screen.
pointer arithmetic:
you can add or subtract from a pointer to move to different locations in memory. this is commonly used when working with arrays.
in my post "how the internet works - part 2", i described computer memory as one of those fancy japanese apartment complexes, where everything is lined up in perfect cubes, and assigned an address in order, so that you can find each apartment. you can read that post if you need a refresher of the physicality of how computer memory works.
rather than storing items in an array randomly, anywhere there happens to be a spare room in the apartment complex, array items are always stored in consecutive memory blocks, with each element in order. you can imagine this as an entire floor being reserved for the array, and each element going into each next room, all the way down the hall.
that way, instead of having to make a pointer for every single item in a given array, which could be very large, we only need one pointer, that stores the address of the first element in the array.
then, when we want to grab the array from memory, it's as easy as just moving down the hallway, and checking who lives in each room, one at a time.
just imagine if the amazon delivery guy needed to keep track of an entire clipboard full of pages with every address in the apartment, and needing to check where the next address is for every single array index, and running all over the apartment complex up and down the stairs to get each one in order, and then back up again for the next one, and back down to where he just was for the one after that...
well, he'd be pretty out of breath, to say the least. that is not an efficient system, and it would just be slow and painful for everyone.
but this way, the delivery guy only needs one sticky note that says: array starts at this address: unit 7. then he can go to unit 7, and when he needs the next item in the array, he can simply tell himself, "well, i guess the next element is at unit 8."
and down the line he goes, until he reaches a special unit that contains a null flag, which is just an empty unit (well, technically it's not empty, it's a unit containing the value null) to let the pointer know that it's reached the end of the array.
this is a much simpler and efficient system, that can be used for an array of any size, without killing the delivery guy from exhaustion. (take note, amazon. respect your workers!!)
here's an example of how this looks in c:
int numbers[5] = {10, 20, 30, 40, 50};
int *p;
p = numbers; // remember, the name of an array is a pointer to the start of the array
printf("%d", *p); // prints: 10
printf("%d", *p + 1); // prints: 20
printf("%d", *p + 2); // prints: 30
printf("%d", *p + 3); // prints: 40
here, p is a pointer that we've pointed at our array of numbers. by increasing p, we're moving the pointer to the next item in the array.
now, looking at this code, you should be starting to see why counting starts at 0!
it's because we're not actually counting the number of elements themselves; we're actually doing simple math to count how many indexes away from the start we want to move.
the first index is 0 because we want to move 0 steps away from the start - the first index is the start. the second index is 1 because we want to move one step away from the start. the third index is 2 because we want to move two steps away from the start. and so on.
to sum up:
when programmers allocate memory for an array, the memory cell is referred to by its offset from the starting memory location.
so, counting starts at 0, because when we start at the first index, that first index has an offset of 0 from the starting memory location!
this 0-indexing is efficient, logical, and also happens to work well with many mathematical operations. so, that's why we count that way :]
and now you know! :]
ps: if you want an even better explanation that this, plus way more, consider signing up for harvard's cs50 course! that's where i learned all this. it's their actual intro to computer science course, and it's available completely free from start to finish, for anyone who wants to take it online.
you don't even have to sign up if you want, as all the lecture videos are also available on youtube. so if you just want to learn more about what i covered here in this post, check out their video titled "week 4 - memory" on youtube!
43 notes · View notes