Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Killamangiro91

computer programming

Recommended Posts

Any of you guys into programming? I'm thinking about learning some languages. Where should I start? I've mostly been into computer hardware but fancy getting some knowledge in the software side. I'm really not good at maths, I mean I'm terrible at it. I heard that programming is a lot about maths, is this true?
Any tips guys? Books suggestions?

Thanks

Share this post


Link to post

I'm majoring in computer science in college, but I haven't had the chance to take any programming classes yet. However, I do know BASIC, assembly (neither of which are very practical) and some C++.

I've had to take all kinds of calculus in college, so it's fair to say that you are at least expected to be able to use math for programming.

Since I am a novice, I don't have much advice except for maybe to avoid trying to learn assembly unless you are interested in things like device drivers and hardware engineering.

Also, I've been using this tutorial and a free version of C++ called Dev C++ from Bloodshed software.

Share this post


Link to post

Mathematical skill is one thing that helps but it's only a small part of the whole process.

There are many different languages and they each tend to have different niches that they're good for. C is useful for low-level stuff - like if you're programming an operating system, or interacting directly with the hardware. For higher level stuff, like a desktop application or the backend code for a website, it's more sensible to use a high level language like Python, Java or C#. Javascript is a high level language that runs inside the web browser.

I'd recommend Python as a first language. There are many "beginner's programming" books that use Python as an introductory language, and universities like MIT are now using it for teaching. It has the advantage that as well as being good for teaching, it's something that you can use for real practical purposes.

You might try Learn Python the hard way. I haven't read it myself (I have no need to), but I've heard some good things about it.

Share this post


Link to post
Stygian said:

Dev C++

Ugh! If you want to torture yourself with C and don't care about being bound to Windows, just use Visual C++ Express.

Share this post


Link to post
fraggle said:

I'd recommend Python as a first language.

Very much this. Personally I hate Python, but it's a great language to learn the basics with. Its anal retentive compiler is also great for forcing good programming habits into your brain.

Share this post


Link to post

Math beyond high school level stuff was completely irrelevant in my last 2 years working as a software developer. Calculus is one thing that turned out to be a complete waste of time at uni.

Dev C++ is an old piece of junk. Since I mainly use Qt embedded I'd recommend Qt Creator even if you're not going to use the libraries and just stick to plain C++.

Share this post


Link to post

Heh, I knew Dev C++ was old so it shouldn't surprise me that there are better IDEs around. I'll give Qt creator a shot. I was not a big fan of Visual C++ Express when I tried it.

Share this post


Link to post
Use3D said:

Go to school.


If you mean college , I can't . I actually tried doing computing at college, but because I didn't do any computing at school I had to take the bottom course. It would have took me 3 years just to get where I am knowledge wise, and then be able to take advance computing class. I self taught everything I know about computers, so might as well continue.
I wish I did a computer class at school but I was a dumb kid that just did the subjects my friends did. Even though I didn't do anything conputerwise at school, I still think it sucks that I had to start at the bottom. The were teaching me how to use MS word. :\
Anyway, yeah. I'm just going to self educate.
Fuck the education system!

Share this post


Link to post

Learn Python the Hard Way.

You could try Codecademy too, if that book doesn't work out for you.

Share this post


Link to post

Programming is fun. Math often isn't. Not sure why in my case. I'm not terrible at it, although calculus hurts hurts my brain. They make you take calculus in computing science programs because you might end up working in a discipline that uses it. Anything that does physics simulation will be full of it, for example. It's a bit like how if you learn how to write a 3D engine you're going to be familiar with linear algebra. The math you need (if any) depends a lot on what you're working on. Being able to do arithmetic sure helps sometimes.

I haven't learned Python yet. I've helped a friend debug some of his code one day. It didn't look any easier or harder than most mainstream languages to me. It does enforce good habits with regards to coding style.2

Share this post


Link to post

How much math you use depends on what you're doing. If you're creating a web application, then you won't be using too much math. If you're trying to improve a program that maps a patient's brain in real time during surgery, you're going to be using a shitload of calculus.

Also, another reason math skills are sought after is that it shows you've got the logical skills to be able to solve these problems.

Share this post


Link to post

I've been known to throw a line of code or two back in the day.

Share this post


Link to post
Mr. T said:

You could try Codecademy too, if that book doesn't work out for you.

Hell no, Javascript is a terrible choice for beginners. The last thing this world needs is more people who know absolutely nothing about programming throwing around horrible JS scripts full of the worst programming practices ever just because it's possible.

Share this post


Link to post
DuckReconMajor said:

How much math you use depends on what you're doing. If you're creating a web application, then you won't be using too much math. If you're trying to improve a program that maps a patient's brain in real time during surgery, you're going to be using a shitload of calculus.

Depends on the web application. For example, look at this. Then look at the math behind it. :)

Share this post


Link to post
fraggle said:

You might try Learn Python the hard way. I haven't read it myself (I have no need to), but I've heard some good things about it.


Python the hard way, eh? That's the wrong link then. You really want to go here instead. ;-)

Share this post


Link to post
hex11 said:

Python the hard way, eh? That's the wrong link then. You really want to go here instead. ;-)

Nope, there's no way I'd ever recommend Perl to anyone these days - beginner or otherwise.

Share this post


Link to post

By the same token, real computer science profs would also fail Linus Torvalds for using monolithic kernel architecture, when microkernel is so obviously more superior. ;-)

Share this post


Link to post

Well yeah, the Hurd is a much better design. You can tell the design is superior because its design phase has lasted 22 years and counting. One day, maybe they'll even implement it!

Share this post


Link to post
Gez said:

One day, maybe they'll even implement it!


By that time, RMS won't be even able to get a hardon, real or e-shaft.

Share this post


Link to post
fraggle said:

Nope, there's no way I'd ever recommend Perl to anyone these days - beginner or otherwise.

hex11 said:

By the same token, real computer science profs would also fail Linus Torvalds for using monolithic kernel architecture, when microkernel is so obviously more superior. ;-)


I can't speak for fraggle himself, but Perl tends to have a crufty syntax and a philosophy of There's More Than One Way To Do It; which basically amounts to several different methods in Perl to do the same thing, all of which are slightly different from each other and there's rarely any hard guidelines on what ones you should use. Its free-form syntax tends to also lend itself to some fairly bizarre uses; it doesn't have to be too bad, but a lot of Perl programmers try to be clever and it only results in the programmers themselves struggling to understand their own code a month or so down the road.

I've hard that Perl6 generally makes the situation better, but overall Python's philosophies and design is a lot cleaner -- which is especially important for beginners. Python doesn't normally add entirely different modules that do the same kind of thing, except in some exceptional cases where backwards compatibility can't be maintained in a simple manner (see the optparse/argparse split as an example that's cropped up into the Python 3 standard library; Python 2 has many more examples). Even then, the old modules/functions tend to be clearly documented as being maintained around for compatibility purposes and you really should use the newer ones for new code (again, see the optparse module as an example).

More than that, Perl's syntax alone should scare off any programmer today, let alone as a beginner's language. If you must learn Perl down the road, then so be it, but hopefully that will be long after you're familar with programming concepts in general.

Share this post


Link to post

The way I was taught Perl in IT was that it was a language you used for two things:
1. Quick-and-dirty "fire and forget" scripts you make one time to solve one problem and then never use again; and
2. Automated treatment of text files requiring intensive regular expression use.

Creating generic programs in Perl was considered a strange idea, since you had C, C++ and Java instead.

Share this post


Link to post

Hmm. I think I'll try Learning Python the Hard Way just because a lot of people seem to be recommending the language. It's a good thing somebody made a thread like this because it's informative to beginners like me.

Currently, I'm hung up on pointers in C++ and going no place in a hurry.

Share this post


Link to post
Gez said:

The way I was taught Perl in IT was that it was a language you used for two things:
1. Quick-and-dirty "fire and forget" scripts you make one time to solve one problem and then never use again; and
2. Automated treatment of text files requiring intensive regular expression use.

Creating generic programs in Perl was considered a strange idea, since you had C, C++ and Java instead.


But then there was that one prof who had us hacking GUIs together in Perl. Was interesting. You could prototype stuff really fast, but it probably wouldn't have been fun making anything big.

Share this post


Link to post

You could always make a difference and instead of trying to be one step behind every major trend (Twitter, facebook, etc.), coding stupid "web" shit and competing with some 500.000.000 hyperactive Indian and AZN kids who would outperform you anyway and work for half a dime, you could learn to program in FORTRAN, COBOL or even MUMPS: there's bound to be a shortage of qualified programmers who can maintain those vintage systems depending upon them.

Share this post


Link to post
Stygian said:

Hmm. I think I'll try Learning Python the Hard Way just because a lot of people seem to be recommending the language. It's a good thing somebody made a thread like this because it's informative to beginners like me.

Python is great as a language for learning programming because it has a simple and consistent syntax, and because there are so many things that you don't need to consider or know about in order to learn it.

As a simple example, here's "hello world" in C:

#include <stdio.h>

int main(int argc, char *argv[])
{
   printf("hello world\n");
   return 0;
}
I can probably count at least a dozen concepts you have to learn to properly understand what's going on here. What's #include? (and what's the preprocessor and what does it do?) What's "int"? What's a function and what's the main function? What is 'argc' and 'argv'? What does 'return' do? Why return '0'? Why does argv have the '*' and '[]' next to it? Why does the hello world message have '\n' at the end? Why and when is the ';' needed? And so on...

The equivalent program in Python is:
print "hello world"
This is admittedly a slightly contrived example, because in this case you can get away with saying "this is magic boilerplate you just need to use, and you don't need to know what it does". Fair enough. But this sort of thing extends to other stuff you need to be able to do basic programming exercises. For example, declaring an integer variable and printing its value. C:
int i = 5;
printf("%i\n", i);
Python:
i = 5
print i
Point is that people who are learning to program are learning to wrap their heads around very basic concepts - like assignment and sequence, and iteration. Every bit of extra boilerplate on top of that is another hoop to jump through.

Currently, I'm hung up on pointers in C++ and going no place in a hurry.

If you really want to start with a low-level language like that, start with plain C and learn C++ as an extension. There are so many extra things in C++ that as a beginner you just don't need to know and can trip you up and potentially confuse you. My favorite anecdote about C++ (and I forget where I read this now), is that you potentially can't tell what the statement "a = b + c;" does, without reading the entire source code to the program, and there are a whole load of concepts that could potentially come in to play - classes, operator overloading, copy constructors, polymorphism, etc. Sure, I'm exaggerating slightly, but you see my point. It's a big, complicated language and C is a heck of a lot smaller and simpler. It's much easier when you can eat the elephant one spoon at at time.



chungy said:

I can't speak for fraggle himself, but Perl tends to have a crufty syntax and a philosophy of There's More Than One Way To Do It; which basically amounts to several different methods in Perl to do the same thing, all of which are slightly different from each other and there's rarely any hard guidelines on what ones you should use. Its free-form syntax tends to also lend itself to some fairly bizarre uses; it doesn't have to be too bad, but a lot of Perl programmers try to be clever and it only results in the programmers themselves struggling to understand their own code a month or so down the road.

My objections to Perl are the syntax, really - it's an "organically grown" language if that makes sense. It started as a slightly more powerful version of awk and over years has had more and more features added to allow it to do more and more things.

It turns out that this is a pretty awful way to design a language. PHP is another example that is pretty similar, if not worse. C++ is another example, where new features have been grafted onto C - some of them conflicting with or replacing the original features. Instead, the nicest languages tend to be those where the majority of the features have been put together in a top-down design at their conception.

I used to use Perl years ago when there wasn't really any other viable alternative, but I never really liked it. I'm really glad that Python and Ruby have hugely grown in popularity in recent years - they occupy a similar solution space to Perl but are are light years more pleasant to use.

Share this post


Link to post

If one wants to learn a "curly bracket" language, by now there's the alternative of starting off with Java or C# or even PHP (which also gets you a bonus as you automatically become a "web developer"...yeah right), as some complexities like the preprocessor and pointers do not exist.

Python seems to have taken the space once occupied by BASIC, while older "educational languages" like Pascal have been all but forgotten, or at least none treats them as such anymore.

In retrospect, I wonder why Pascal was considered as a good language for teaching beginners programming: it just seems to blend in the worst elements of Fortran (itself quite a clusterfuck) and C in one nasty package. Yeah, it has an "easy" write() statement, but going anywhere beyond that soon becomes a clusterfuck of rules, exceptions and jumping through hoops, while lacking the syntactical consistency and predictability of C.

My point of view?

Total beginners which are never going to program for a living are safer to begin with an interpreted language in a controlled environment (Python would work well for a general approach, but even Matlab language might work well, esp. for non-software/non-electrical engineering students). Kinda like you only trust a beginner with a bumper car in a closed area, or at most with an electric car in a golf course. Asking anymore of them at this point is just sowing distaster (or general protection faults).

For more ambitious types, you may risk it all by diving straight into Java (especially if they want "to make some apps ASAP"), opening them up the potential for web or Android development, or even Javascript (which might "go down easier", as it is still interpreted and all it requires is a text editor and a browser, allowing them to get visual results almost immediately, something which is nearly impossible with other languages, unless you use a GUI RAD IDE).

IMO, C/C++ should be reserved to hardcore CS/EE types, as they are more tools of the trade than good teaching tools.

A few very special cases e.g. image processing or number crunching or rapid development of desktop apps might be best served by specialty languages + their IDEs (e.g. Delphi, Fortran, C#) but I'd consider those "intermediate" in difficulty, not to be used as training tools for complete beginners.

Share this post


Link to post

I feel kinda disadvantaged, because I started programming by playing with Basic and similar, not by using fancy stuff like Python which actually holds a use for any moment.

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×