10 Replies - 6956 Views - Last Post: 31 May 2011 - 02:47 PM

#1 EnvXOwner  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 357
  • View blog
  • Posts: 2,319
  • Joined: 10-August 09

Computer Programming Concepts

Posted 30 May 2011 - 06:40 PM

Hey guys, I've been doing computer programming for two years now, and I don't think that I've learned about the concepts of programming. So, I come here today, to ask you what are the concepts? What should I know about programming in general. Like algorithms, OOP. How could I learn this? If you guys got any books or tutorials that would be helpful. I'm sorry if my question sounds blatant. :)

Is This A Good Question/Topic? 3
  • +

Replies To: Computer Programming Concepts

#2 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10478
  • View blog
  • Posts: 38,841
  • Joined: 27-December 08

Re: Computer Programming Concepts

Posted 30 May 2011 - 06:49 PM

My thread Getting Better at Programming Java discusses a lot of these concepts. Most of these apply to other languages as well. If you are comfortable with basic OOP, design patterns and data structures are two obvious next steps, with the data structures being more involved, imo.
Was This Post Helpful? 2
  • +
  • -

#3 EnvXOwner  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 357
  • View blog
  • Posts: 2,319
  • Joined: 10-August 09

Re: Computer Programming Concepts

Posted 30 May 2011 - 07:22 PM

View Postmacosxnerd101, on 30 May 2011 - 09:49 PM, said:

My thread Getting Better at Programming Java discusses a lot of these concepts. Most of these apply to other languages as well. If you are comfortable with basic OOP, design patterns and data structures are two obvious next steps, with the data structures being more involved, imo.

Thanks. I'll bookmark that thread and take a look at it tomorrow, when I'm not as tired.

Looks like I'm part of stage 2 and 3 with PHP. Python I'm at like stage 1. I'll research items on your list I don't know about. :)

Is it a bad thing that I know of only two data types, string and integer? lol

This post has been edited by EnvXOwner: 31 May 2011 - 02:23 AM

Was This Post Helpful? 0
  • +
  • -

#4 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5481
  • View blog
  • Posts: 11,762
  • Joined: 02-June 10

Re: Computer Programming Concepts

Posted 31 May 2011 - 06:16 AM

There are a ton of concept books at every bookstore I've walked in to.
Do you not have a Borders or Barnes & Noble within driving range?
Fry's Electronics is more rare, but has more targeted book selection.

I will admit that I go to the bookstore, scan the ISBN with an app on my iPhone to see if their prices are reasonable. I don't mind paying *somewhere in the neighborhood* of other stores, but sometimes you see Borders price at $45 for a book I can get shipped to me for $20 and free shipping. This also makes a good shopping list for me.
Was This Post Helpful? 1
  • +
  • -

#5 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10478
  • View blog
  • Posts: 38,841
  • Joined: 27-December 08

Re: Computer Programming Concepts

Posted 31 May 2011 - 06:22 AM

Quote

Is it a bad thing that I know of only two data types, string and integer? lol

You're a PHP programmer by trade, right? Have you heard of PDO or MySQLi? When you instantiate a new PDO() or new mysqli(), PDO and mysqli act as data types. Arrays are data types as well. When you work with OOP and design a class, that class is a data type. I'm sure you've heard of more data types as well. :)
Was This Post Helpful? 2
  • +
  • -

#6 ccubed  Icon User is offline

  • It's That Guy
  • member icon

Reputation: 160
  • View blog
  • Posts: 1,403
  • Joined: 13-June 08

Re: Computer Programming Concepts

Posted 31 May 2011 - 07:31 AM

I think the most basic concepts are just knowing the difference between the following things:

Objects
Functions
Types
Scope
Control

Those are the five basics, but MacOSXNerd does a good job of going into deeper concepts around them.
Was This Post Helpful? 2
  • +
  • -

#7 jon.kiparsky  Icon User is online

  • Pancakes!
  • member icon


Reputation: 7649
  • View blog
  • Posts: 12,902
  • Joined: 19-March 11

Re: Computer Programming Concepts

Posted 31 May 2011 - 10:10 AM

*
POPULAR

Some basics that should be obvious: data structures. You should be able to write the basic lists and trees and sorts in whatever language you favor. If you understand them, you can use them.

Underlying code - how does code get generated in your language? How does that affect your code? If you can, look at the object code (ie, compile your C to assembly or use javap -v to look at your java bytecode). Understand what's actually going on under the hood.

Assembler - while you're at it, learn some assembler. These days, there's really no excuse for not having a cheap laptop with a CLI install of linux, just for trying low-level stuff like that. Randall Hyde has a few good books from No Starch under the title of "Write Great Code" - mostly, he's talking about the relevance of a working knowledge of assembler to a higher-level programmer. I think he's got a good point.

Learn more languages. PHP is fine, but if you want to know more about programming you should probably get yourself comfortable in about a half-dozen languages. For me, a basic toolkit includes C, Java, perl, *sh, a lisp or two, and probably something more modern like python or like that. You can substitute, of course - if you like the .NET framework, C# is basically a Java knockoff, so you can swap those around, and PowerShell is a sort of degraded mutant perl - but the idea is to gain a degree of breadth. I don't say you should be expert in those, but you should be able to write a small but non-trivial program without too much bother, or for perl and *sh you should be able to write useful tools quickly and impress your friends. The point is to get a sense of what's easy in each of them, not just to do what's easy in your own preferred language.

Read a lot. The Little Schemer is probably my favorite book for programmers - it's written to Scheme, obviously, but you should be able to modify the problem set (if not the answers provided) for any flavor of lisp, or for perl or Python if you're really a mental case. Solving the problems in that book will absolutely make you a better programmer, and it's a lot of fun. Knuth, of course, is a touchstone work, but it's also really beautifully written. I've just started in on TAOCP1, and it's making me think a lot. Hofstadter's Goedel Escher Bach is a great one, and Raymond Smullyan's puzzles are great fun ("What Is the Name Of This Book?" is a great collection).

Lear some math: Learn some set theory, theory of functions. Again, you don't have to get a PhD in math, but wrestling with this stuff will make it easier to think about programming. Rosenbloom's Elements of Mathematical Logic is available from Dover for cheap, and in the first five pages he establishes the connection between Boolean Logic and set theory - not bad.

Write a lot of programs. Little ones and medium ones are good - project euler (projecteuler.net) is a great source of ideas for small programs that will make you work pretty hard, and there are plenty of medium-sized ideas out there. Write a simple text editor. See if you can make it good enough to use regularly.

That'll get you started, anyway.
Was This Post Helpful? 5
  • +
  • -

#8 Shane Hudson  Icon User is offline

  • D.I.C Technophile
  • member icon

Reputation: 343
  • View blog
  • Posts: 1,286
  • Joined: 06-December 09

Re: Computer Programming Concepts

Posted 31 May 2011 - 10:28 AM

That thread by macosxnerd101 is great, and as I do not often go through the Java forum, I had not read it before so thanks for the link! Looks like I am at stage 3 in mosts languages, as although I know some of the stage 4 things I am not a master at stage 3 yet!

I think the most important thing is understanding why. Why do computers work in binary? Why do we need to initialise a variable?

If you understand most of the whys and you can learn a language quickly (because lets face it, if they are in the same paradigm then they are usually more or less the same language). Also, do not be afraid of change. Keep up to date with technology (as much as you can anyway, sometimes it gets expensive) and if you feel bored try another paradigm. Personally I do not tend to have many problems with OOP or Procedural but I cannot yet write a full program in a functional language (although I do love what I can do and have seen people do in haskell!).
Was This Post Helpful? 2
  • +
  • -

#9 jon.kiparsky  Icon User is online

  • Pancakes!
  • member icon


Reputation: 7649
  • View blog
  • Posts: 12,902
  • Joined: 19-March 11

Re: Computer Programming Concepts

Posted 31 May 2011 - 11:32 AM

View PostShane Hudson, on 31 May 2011 - 12:28 PM, said:

I think the most important thing is understanding why. Why do computers work in binary? Why do we need to initialise a variable?


QFT. Understanding, as much as you can, the machine down to the basics, is both fun and productive. Asking "why" is a great way to get there.
Was This Post Helpful? 0
  • +
  • -

#10 EnvXOwner  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 357
  • View blog
  • Posts: 2,319
  • Joined: 10-August 09

Re: Computer Programming Concepts

Posted 31 May 2011 - 02:39 PM

View PosttlhIn`toq, on 31 May 2011 - 09:16 AM, said:

There are a ton of concept books at every bookstore I've walked in to.
Do you not have a Borders or Barnes & Noble within driving range?
Fry's Electronics is more rare, but has more targeted book selection.

I will admit that I go to the bookstore, scan the ISBN with an app on my iPhone to see if their prices are reasonable. I don't mind paying *somewhere in the neighborhood* of other stores, but sometimes you see Borders price at $45 for a book I can get shipped to me for $20 and free shipping. This also makes a good shopping list for me.


I live near a Barnes and Nobles. I love that store. lol. I'll see if my dad will take me there.

View Postmacosxnerd101, on 31 May 2011 - 09:22 AM, said:

Quote

Is it a bad thing that I know of only two data types, string and integer? lol

You're a PHP programmer by trade, right? Have you heard of PDO or MySQLi? When you instantiate a new PDO() or new mysqli(), PDO and mysqli act as data types. Arrays are data types as well. When you work with OOP and design a class, that class is a data type. I'm sure you've heard of more data types as well. :)


Yeah, I'm a PHP programmer. I'm not sure if I've heard of PDO, but I've heard of MySQLi, which I'm using in a project right now. I really don't know the difference between MySQL and MySQLi, but I'll Google that.

Thanks guys, I'm taking everything into consideration. :)
Was This Post Helpful? 0
  • +
  • -

#11 EnvXOwner  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 357
  • View blog
  • Posts: 2,319
  • Joined: 10-August 09

Re: Computer Programming Concepts

Posted 31 May 2011 - 02:47 PM

View Postjon.kiparsky, on 31 May 2011 - 01:10 PM, said:

Some basics that should be obvious: data structures. You should be able to write the basic lists and trees and sorts in whatever language you favor. If you understand them, you can use them.

Underlying code - how does code get generated in your language? How does that affect your code? If you can, look at the object code (ie, compile your C to assembly or use javap -v to look at your java bytecode). Understand what's actually going on under the hood.

Assembler - while you're at it, learn some assembler. These days, there's really no excuse for not having a cheap laptop with a CLI install of linux, just for trying low-level stuff like that. Randall Hyde has a few good books from No Starch under the title of "Write Great Code" - mostly, he's talking about the relevance of a working knowledge of assembler to a higher-level programmer. I think he's got a good point.

Learn more languages. PHP is fine, but if you want to know more about programming you should probably get yourself comfortable in about a half-dozen languages. For me, a basic toolkit includes C, Java, perl, *sh, a lisp or two, and probably something more modern like python or like that. You can substitute, of course - if you like the .NET framework, C# is basically a Java knockoff, so you can swap those around, and PowerShell is a sort of degraded mutant perl - but the idea is to gain a degree of breadth. I don't say you should be expert in those, but you should be able to write a small but non-trivial program without too much bother, or for perl and *sh you should be able to write useful tools quickly and impress your friends. The point is to get a sense of what's easy in each of them, not just to do what's easy in your own preferred language.

Read a lot. The Little Schemer is probably my favorite book for programmers - it's written to Scheme, obviously, but you should be able to modify the problem set (if not the answers provided) for any flavor of lisp, or for perl or Python if you're really a mental case. Solving the problems in that book will absolutely make you a better programmer, and it's a lot of fun. Knuth, of course, is a touchstone work, but it's also really beautifully written. I've just started in on TAOCP1, and it's making me think a lot. Hofstadter's Goedel Escher Bach is a great one, and Raymond Smullyan's puzzles are great fun ("What Is the Name Of This Book?" is a great collection).

Lear some math: Learn some set theory, theory of functions. Again, you don't have to get a PhD in math, but wrestling with this stuff will make it easier to think about programming. Rosenbloom's Elements of Mathematical Logic is available from Dover for cheap, and in the first five pages he establishes the connection between Boolean Logic and set theory - not bad.

Write a lot of programs. Little ones and medium ones are good - project euler (projecteuler.net) is a great source of ideas for small programs that will make you work pretty hard, and there are plenty of medium-sized ideas out there. Write a simple text editor. See if you can make it good enough to use regularly.

That'll get you started, anyway.

I plan on learning a lot more languages than PHP. I plan on learning Assembly, C, C++, Java, Ruby, and Python. Maybe more, but as of now that is it. Good thing I like math, so I'll be able to sit down and learn set theory, and they of functions. I'll certainly check out the books you have mentioned. Thanks for the advice ! :D
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1