Official CS50x Thread (Free Online Harvard Programming [C, PHP, HTML, Javascript, SQL...] Courses

Hood Critic

The Power Circle
Joined
May 2, 2012
Messages
24,143
Reputation
3,747
Daps
110,139
Reppin
דעת
there is a linux version in the download page i think.

I'm running hyper-v on windows 8.1 and Server 2012 machines...so I need a VM that's compatible to import into hyper-v. The .ova/.ovf files supplied by Harvard are only VMWare/Virtual Box compatible.
 

Data-Hawk

I have no strings on me.
Joined
May 6, 2012
Messages
8,420
Reputation
1,985
Daps
16,306
Reppin
Oasis
You talking about PSet 1 ? I only read the recommended pages on the linked website. Won't bother buying the books, I'm not here for that :lolbron:
But damn, Week 1 really made a jump on the difficulty level. There are some Shorts that I literally watched with the :wtf: face (above all the one with the linker, assembler and so on stuff which had me :lupe:)


I see (no pun).
I'm in it for PHP / Mysql which will be covered later so I don't really care about C (but I'll learn it). But considering your reply, why that CS50 focuses on C then ? Does it help understanding other languages as it is one of the oldest ? Does it gives some basic knowledge needed for other languages (Java for example) ?
Looking at C's coding structure, I can see it shares a whole lot with PHP, so even if I don't know about future courses, it seems that C knowledge may be really useful for website programming.


The syntax may look familiar, but trust me nobody in their right mind would use C for any web development( at least on the front-end). For why C is still taught in colleges, most Computer Science courses aren't geared to teach you how to program one type of application, if so you wouldn't have to take so many math classes and you'd mainly learn VB.net/C#/Java. The course purposes are to teach you how to solve problems by programming( algorithms, Data structures, Design patterns etc) this way you won't get bogged down in the language per say, but the theory behind it. Plus C is a simple language, but it becomes troublesome when you have to work with teams( This is why OOP is preferred now-a-day) or Huge programs

If you wanted to think of C for web development, The server you use would be written in C( for example Apache is written in C, PHP itself is written in C , MySQL is written in C/C++ ). That's another thing I forget, most programming languages themselves are written in C.


For C helping with learning Java.......ahh Once you know one, it's a lot easier to pick up another, but how you go about solving problems would be different. Check this out for the history of C.


http://en.wikipedia.org/wiki/C_(programming_language)

"
C is often used for "
system programming", including implementing operating systems and embedded system applications, due to a combination of desirable characteristics such as code portability and efficiency, ability to access specific hardware addresses, ability to pun types to match externally imposed data access requirements, and low run-time demand on system resources. C can also be used for website programming using CGI as a "gateway" for information between the Web application, the server, and the browser.[33] Some reasons for choosing C over interpreted languages are its speed, stability, and near-universal availability.[34]

One consequence of C's wide availability and efficiency is that compilers, libraries, and interpreters of other programming languages are often implemented in C. The primary implementations of
Python (CPython), Perl 5, and PHP are all written in C.

Due to its thin layer of abstraction and low overhead, C allows efficient implementations of algorithms and data structures, which is useful for programs that perform a lot of computations. For example, the
GNU Multi-Precision Library, the GNU Scientific Library, Mathematica and MATLAB are completely or partially written in C."
 

Czerka

All Star
Joined
May 6, 2012
Messages
6,895
Reputation
-120
Daps
6,732
Reppin
NULL
In case anyone is interested I ironically stumbled upon the following today it's pretty good.

If you want it, hit me up.

Im in.

I looked at the recommended reading though and they want us to read like 10 chapters :wtf: i dont think anyone in the actual course is doing that much reading
 

Hood Critic

The Power Circle
Joined
May 2, 2012
Messages
24,143
Reputation
3,747
Daps
110,139
Reppin
דעת
Im in.

I looked at the recommended reading though and they want us to read like 10 chapters :wtf: i dont think anyone in the actual course is doing that much reading
Check your PM and the chapters in the required reading book are fairly short, especially in the beginning.
 

Type Username Here

Not a new member
Joined
Apr 30, 2012
Messages
16,368
Reputation
2,385
Daps
32,643
Reppin
humans
For C, up until about 2000 - 2005 it was probably the most popular language out, then the whole Object Oriented programming thing happen and the 2 main languages were C++ and Java( I'll come back to these 2 later ). C is considered a low level( some say mid-level ) language. The best way to put that is, C programs tend to run closer to the hardware( less layers etc ) and the language gives you let says more power ( good and bad ). Now a days C is only used where you need the program to be as efficient and fast as possible, these programs typically include

* Operating systems ( I'm pretty sure Windows 7 & 8 still have some legacy C code, Linux/Android, Mac OS , iOS and a host of others, at the core they are written in C )
* Embedded systems
* Game Programming was all done in C up until about 2003 and everybody switched over to C++ pretty much after the Unreal engine popped up.
* Simulations / Security software, I think NASA still uses a lot of C.

I'm sure I'm leaving out other fields, but that's just off the top. So ya from the 80's-90's C ruled the world. But of course with great power , comes great responsibility. C programming pretty much let you do anything you wanted, there's not a whole lot of constraints in the language, which led to bugs and the most famous ones came from the fact you have to manage memory yourself, and in doing so led to security problems( namely buffer overflows ). Now you have to add onto the fact C is not Object Oriented. Hello C++. While C++ was objected oriented and it almost match the speed of C( early C++ compilers were not as optimized as C compilers ), you still had to manage memory yourself and a host of other things. Here comes Sun's Java and Microsoft C# ( History lesson, Microsoft had their own version of Java called J++, but Sun microsystems sued MS, so Microsoft created C# ), Java and later C# were designed with security in mind. You no longer had to manage memory yourself or worry about buffer overflows( supposedly ), Also Java came with a bunch of pre-written libraries saving the developer time.

Java's biggest selling points were( Write Once, Run anywhere and Security ). Java/C# have what's called a Garbage collector, that basically does a lot of the low level work for you, whereas in C you have to take care of it yourself, So this allowed developers to focus more on Software problems instead of computer problems(Also since C runs so close to the hardware it's not as portable as Java ).

So unless you decide to write programs in the above fields, I would stay away from C, but it will *never* be outdated. There's a lot of legacy code out there and if it works companies usually will not risk changing it, Plus trust me if you ever have to write a windows program from scratch in C, you'd kill yourself. I'm talking about writing 200 - 300 lines of code just to setup a window and have a dialog box. ( Wow bringing back the memories..ha-ha ).

For Android programs, most of them are written in Java, for iOS it's Objective C ( god awful language). But nowadays there's so many frameworks out there, you can write mobile apps in just about any language( I've seen an Android game written in Python.. I wouldn't recommend it though. Lol)

It's pretty much spot on (though I take issue with some of your opinions). I work with C almost everyday on operating systems' level work. There is a HUGE demand for competent C programmers, especially those that know about operating systems. The world pretty much runs on C. You have to know at least basic concepts of C in order to pass an interview at the major companies. UNIX/Linux basics too. Now, if you want to learn as an added skill, as hobby, or to make apps, you don't have to worry about it as our friend said. But if you want to go further make sure you understand C. In my opinion, all students should begin at C and branch from there.
 

gho3st

plata or plomo
Joined
Oct 27, 2012
Messages
34,641
Reputation
2,795
Daps
83,284
Reppin
2016
Spoiler it then. I'm doing it today because I couldn't yesrterday :lolbron:

DO THAT, SO HOPEFULLY WE DONT HAVE TO GO THROUGH THAT :mjpls:
#include <stdio.h>

int main(void)
{

char c = '#';
char e = ' ';f.
int max = 7;

for ( int j = 1; j < 9 ; ++j)
{
for ( int i = 1; i < 10 ; ++i)
{
printf("%c", e);
if (i == max)
for(int i = 0; i < j + 1 ; ++i)
printf("%c", c);

}
max = max - 1;
printf("\n");
}
}

EDIT: this is without asking the user for the height.
 
Last edited:
Top