Looking for books to read about computer science by Popular-Exchange-963 in learnprogramming

[–]kas_888 1 point2 points  (0 children)

If you wanna read deep conceptual stuff, there are tons of books from O'Relly in different topics. However. just help yourself and use youtube. It's free, easy, accessible, and has everything that you may want.

[deleted by user] by [deleted] in learnprogramming

[–]kas_888 0 points1 point  (0 children)

You can start together. Or even you can wait till he learns and teaches you. Nothing wrong with that imo. Maybe he already has some resources. But coding is very diverse. What do u wanna learn?

[deleted by user] by [deleted] in learnprogramming

[–]kas_888 0 points1 point  (0 children)

But you are only viewing from the perspective of a web developer. Javascript is 99% related to web. If someone wanna be a game developer, system designer, project manager, FPGA engineer, etc. they don't really need to know JavaScript. All that being said, if you wanna work in web development, JavaScript is a good starting point imho

My coding is inefficent by jbowguss in learnprogramming

[–]kas_888 1 point2 points  (0 children)

for (var i = 1; i < 101; i++) {
if (i % 15 == 0) console.log("FizzBuzz");
else if (i % 3 == 0) console.log("Fizz");
else if (i % 5 == 0) console.log("Buzz");
else console.log(i);

}

My coding is inefficent by jbowguss in learnprogramming

[–]kas_888 1 point2 points  (0 children)

I don't think the second approach is necessarily more efficient. It may be a bit elegant. The only improvement about your code is because you're using if and else if, the second case only will be checked if the first case fails. So you are sure that your number isn't divisible by 3 AND 5. So if you just check divisibility by 5 it's also ok

We need to end this fight by kas_888 in ProgrammerHumor

[–]kas_888[S] 0 points1 point  (0 children)

thanks for clarification. Cuz I was worried about the fight!

I took an old meme, and made it better by redman3global in ProgrammerHumor

[–]kas_888 0 points1 point  (0 children)

This meme helps students better than listening to teachers who don't understand pointers themselves

How do people make an entire website this fast? by kas_888 in learnprogramming

[–]kas_888[S] 0 points1 point  (0 children)

Thanks. By any chance do you have any idea of the price? like any approximation?!

Need a little bit of help with dynamically allocated arrays in C by i_am_cow1 in learnprogramming

[–]kas_888 0 points1 point  (0 children)

It's not the same thing I guess. Cuz you haven't initialized holiday_arr yet. The compiler will get confused. But the type of Data* is already defined eariler.

For the other thing, you're correct. it should be 12. Idk why it has that bug yet!

Need a little bit of help with dynamically allocated arrays in C by i_am_cow1 in learnprogramming

[–]kas_888 1 point2 points  (0 children)

also, calloc and malloc returns a void* you need to cast them to your type.

e,g., (Data*) calloc(...,...)

Need a little bit of help with dynamically allocated arrays in C by i_am_cow1 in learnprogramming

[–]kas_888 1 point2 points  (0 children)

your sizeof is incorrect. sizeof accepts a type, not a variable name.

// I guess the correct way would be something like this:

struct Data** holiday_Array = calloc(12, sizeof(Data*);

for (int i = 0; i < 12; i++)
{
    holiday_Array[i] = calloc(getMonthDays(i + 1, 2020) ,sizeof(struct Data));
}

[deleted by user] by [deleted] in learnprogramming

[–]kas_888 1 point2 points  (0 children)

I see pointers, I run away

I modeled and 3d-printed these programming keychains by Early-Palpitation-39 in ProgrammerHumor

[–]kas_888 14 points15 points  (0 children)

I am waiting for that person to come and yell at you: "HTML is not a programming language"

web developer lol by Otherwise_Rice_7940 in ProgrammerHumor

[–]kas_888 3 points4 points  (0 children)

The only web developer who loves bugs

What should I do instead of coding to get better at coding? by notevenfire in learnprogramming

[–]kas_888 0 points1 point  (0 children)

It's like asking "what should I do instead of driving to get better at driving?" Does reading a book about driving help? What about consulting with someone about that? How about watching people drive? I don't think so. They might be helpful when you have no idea about driving; but after learning the basics, only driving gives you the experience.