Page 2 of 4 [ 53 posts ]  Go to page Previous  1, 2, 3, 4  Next

CompSciMan
Hummingbird
Hummingbird

User avatar

Joined: 3 Nov 2007
Gender: Male
Posts: 22

14 Nov 2007, 9:48 pm

I STRONGLY recommend starting with Java!! ! It's a very dumbed-down version of C++ so you won't have as many hastles trying to get things to work in the beginning. It's easy to learn and easy to use. It's much more relevant than things like Visual Basic. You can learn VB or anything else later on. Learn how to program BEFORE you start using graphics or GUI (Graphical User Interface). Once you learn how to code and then later learn what classes, objects, and pointers are, learning GUI is simple.

Book: "Big Java 6th edition" by Horstmann
Compiler: Eclipse - www.eclipse.org (it's free, awesome compiler, runs on Windows or linux)

After Java, step up to the big leagues ... C++. But first do Java, then some assembly language with a beginners book on computer architecture so you actually get some understanding of what you are telling the computer to do. Most people who program are in the dark (I once was too).

I don't consider things like perl to be programming languages. They are scripting languages with very little power. Their only advantage is to do very simple things very quickly. You don't want to have to write a C++ program just to parse a file and append a word in a few places, or to create a build script. That's what scripting languages are for.



OregonBecky
Veteran
Veteran

User avatar

Joined: 30 Sep 2007
Age: 70
Gender: Female
Posts: 1,035

14 Nov 2007, 11:12 pm

wrongthinking wrote:
I am pretty good at using a computer, I have learned some low level network troubleshooting. I learn software in general fast. My meager attempts at learning programming (which I'm interested in and everyone says I would be good at) have only taught me how to handle repeated and miserable failure. :cry:
Every resource I have tried (I have only tried free ones as I haven't the budget to waste) has been useless. (Esp. Microsoft)
I see a lot of step by step walk-troughs (that usually fail) but nothing that actually goes into the theories behind it. So at the end of a successful one, I still know nothing! Is it hopeless?

I was just skimming over the posts for the first time. I liked cavac's response -- I was sure cavac had actually read your point about wanting to know "Why" and not just "What." More, cavac offered to work with you. Can't beat that. A reply doesn't get much better than that. If you've the time to offer and don't mind being sent in directions not necessarily entirely to your liking, I'd consider seriously taking cavac up on it.

Cavac's point about having a practical end-point to drive your theoretical learning is a good one, too. What drove me to learn physics and mathematics was wanting to build (and eventually design) my own telescopes. I did eventually build three before I was 20, and designed two of them. But having that "need" in front of me was a big help in overcoming what seemed like a lot of math.

Your point about your current knowledge being far, far away from what you might like to acheive is also a good point to consider. When I was growing up, for example, no one made inexpensive telecopes and if you wanted one and weren't rich you pretty much had to "do it the hard way." Back in that day, there were some four or five regular periodicals dedicated soley to folks making telescopes and a variety of suppliers for glass and so on. Today, there are NO popular periodicals at all that have survived and pretty much ONE supplier of glass -- as long as you like it in just the one way they offer it -- Wilmann-Bell. In electronics design, too, there used to be so many different sources for interesting parts, etc. I built my own computer in the early 1970s from ICs and other passive parts. That took time and learning. But then, it had only 256 bytes of static ram until I added two 4k dynamic cards, that I also built by hand. Today, though, just thinking about the idea of building your own Nintendo DS Lite is dizzying. Yet you can buy fantastic pieces of hardware for almost nothing. So the interest in going through all the trouble it takes to actually build something like that disappears, when you can buy them right now and use a tested and working device for a lot less money and less time and a lot less learning, too. The motivation for climbing that barrier, one that has grown higher and higher with each passing year, is harder and harder to come by.

Programming is like that, too. Microsoft is "doing all the hard stuff" for you, putting out .NET and VB and others are making very easy to use, and practical, tools like PHP and so on. These tools place you well above the details going on inside, serialize access so you don't need to worry at all about parallel operations, and these will NOT do much to teach you how computers actually work inside (because they insulate you so much.) So if you learn to use a language like VB or PHP (or Perl, in my opinion), you will not really learn that much about how computers actually work inside. If that is your interest, you need to look elsewhere.

If you are really interested in the gritty details, I tend to recommend getting and learning to use an embedded controller. There are numerous kits available for as little as $10 or so, and provide you with a complete computer and memory and at least some LEDs you can use. Many of the boards include switches and lights. You don't need to know ANY electronics, either, to use these tools (though it never hurts to let them encourage you to learn more.) And there are a lot of lessons to be learned about computers, just programming them. There is one from Texas Instruments that I picked up for $9.99 each, snaps into a USB port, includes an assembler, C, and C++ compiler you can use (IDE, debugger, etc., included.) You can learn a lot about computers, this way.

The problem with any of these ideas, and others, is that you need access to someone to ask questions. It is very hard to learn internal details without someone who can share with you important ideas they've acquired -- ways to look at things. And I don't know of a really good resource on the web for doing this. Usually, by the way, computer achitecture is taught in the 2nd year of college (I've taught it.) Sadly, c++ is taught in the first year (that language is NOT the right, first language to learn.)

But, anyway, that is why I think cavac's offer is so sweet. Having a connection to someone is very helpful and cavac is offering you something really nice -- a connection. If you can manage the time, of course.

Jon (writing on Becky's account.)


_________________
Time flies like an arrow. Fruit flies like a banana.


Fuzzy
Veteran
Veteran

User avatar

Joined: 30 Mar 2006
Age: 51
Gender: Male
Posts: 5,223
Location: Alberta Canada

15 Nov 2007, 12:55 am

I'f like to take the opposite tack. The evolution of tools means we dont have to fuss with pushing registers onto the stack each time we need to write a loop.

I like details. I LOVE assembler. But continuously reinventing the wheel doesnt make sense.

Integerated circuits were created so you dont have build NANDS out of resistors and transistors each and every time you build a new device. You dont have to test or trouble shoot each piece of that NAND either. The growth of technology means that we get closer to creating from pure thought. The idea is to get away from burning your fingers on a soldering iron.

Same goes for programming. Its important that we abstract our attention from the details so that we can flesh out the overall design. machine code begat assembler, and assembler begat the C generation. I think that C++ is somewhat of a dead end. It doesnt draw together the needs of modern technology like multi threading CPUs, hugely sublinked libraries and the like. Like ASM, its focus is too narrow to deal with the complexities of modern programming needs, which is why we are seeing larger and larger programming teams. Its like medical specialization; one doctor cannot know it all.

And this is sad, because the days of one man(or woman) creating something novel and exciting is gone. Its just too much work.

The binding of machine code into C/C++ routines allowed programming to abstract and programs could become more complicated. In essense, it was like turning transitors into ICs. Efficiency was gained. Now it is time to take those functions and bind them like ICs became CPUs. A new generation of programming languages is needed.

All that has gone before has been well bug checked, optimized and documented. Now its time to bring programming one step closer to human language.

But I fully advocate at least getting a basic idea of what goes on in your routines and functions. Just dont expect to work much magic there.

After all, I'd love to know how a microwave works, even if i dont need that to use it.



CompSciMan
Hummingbird
Hummingbird

User avatar

Joined: 3 Nov 2007
Gender: Male
Posts: 22

15 Nov 2007, 8:38 pm

Fuzzy wrote:
I'f like to take the opposite tack. The evolution of tools means we dont have to fuss with pushing registers onto the stack each time we need to write a loop.

I like details. I LOVE assembler. But continuously reinventing the wheel doesnt make sense.

Integerated circuits were created so you dont have build NANDS out of resistors and transistors each and every time you build a new device. You dont have to test or trouble shoot each piece of that NAND either. The growth of technology means that we get closer to creating from pure thought. The idea is to get away from burning your fingers on a soldering iron.

Same goes for programming. Its important that we abstract our attention from the details so that we can flesh out the overall design. machine code begat assembler, and assembler begat the C generation. I think that C++ is somewhat of a dead end. It doesnt draw together the needs of modern technology like multi threading CPUs, hugely sublinked libraries and the like. Like ASM, its focus is too narrow to deal with the complexities of modern programming needs, which is why we are seeing larger and larger programming teams. Its like medical specialization; one doctor cannot know it all.


C++ is far from a dead end. Unlike Java and any other OO-based language, C++ allows you write efficient programs, AND you can access hardware as needed. I understand that languages will keep evolving closer to human language, as well they should, but with each step closer you loose efficiency. That doesn't matter if you are writing small apps, but it sure does when you are writing large ones, or time-critical ones, or safety-critical ones, or libraries that may be used in a variety of situations, or ones that need a small footprint, or embedded ones (iphone, ipod, and just about every modern device that uses electricity).

Also, the less people know about what happens at the low-level, the worse of a programmer they are. How can you possibly write efficient code if you don't understand how or why? Again, this doesn't matter for small apps, or apps with limited users, but it matters for everything else. The problem with abstracting away low-level knowledge is that you end up writing bad code.

But you are right that there certainly will be another level coming MC -> asm -> C -> C++ ->??? No, java or Ruby is not next on the list. I actually like Java alot because it's easy. But it's slow and takes away from your ability to write efficient code. Great for the internet, bad for everything else.



Fuzzy
Veteran
Veteran

User avatar

Joined: 30 Mar 2006
Age: 51
Gender: Male
Posts: 5,223
Location: Alberta Canada

16 Nov 2007, 12:32 am

Quite right. Perhaps I should have spoke more cleanly; it is always needed to have the C family and asm, but most of the work should be done as high level as possible; it is only when you need to streamline that you fall back on writing in C++. if that doesn't do the trick, you fall back and write it in assembler.



CompSciMan
Hummingbird
Hummingbird

User avatar

Joined: 3 Nov 2007
Gender: Male
Posts: 22

16 Nov 2007, 1:31 am

Sorry for my rant. I've heard too many people in programming talk about how they hate C++. The real reason is they don't want to have to THINK about their code. They'd rather have a slow language like Java do the work for them so they don't have to think. I just don't see why it's so difficult to take care of how a program uses memory, or where pointers are pointing and how to properly manipulate them? I'm not a C++ guru, but I love the power it yields! Also, I'm a software wienie so I'm protective about outsiders who aren't true programmers. I have no problem with languages evolving to where non-programmers can use them. My problem is when people who think they are programmers want to use those dumbed-down languages as a shortcut to thinking.

Yeah, I'm a little egotistical!



lau
Veteran
Veteran

User avatar

Joined: 17 Jun 2006
Age: 75
Gender: Male
Posts: 9,618
Location: Somerset UK

16 Nov 2007, 8:29 am

CompSciMan wrote:
Sorry for my rant. I've heard too many people in programming talk about how they hate C++. The real reason is they don't want to have to THINK about their code. They'd rather have a slow language like Java do the work for them so they don't have to think. I just don't see why it's so difficult to take care of how a program uses memory, or where pointers are pointing and how to properly manipulate them? I'm not a C++ guru, but I love the power it yields! Also, I'm a software wienie so I'm protective about outsiders who aren't true programmers. I have no problem with languages evolving to where non-programmers can use them. My problem is when people who think they are programmers want to use those dumbed-down languages as a shortcut to thinking.

Yeah, I'm a little egotistical!

Sorry, but you keep on plugging C++, which I believe is just about the worse thing that ever happened to programming.

At about the time that C++ appeared, I was using Delphi, and quite enjoying it. I have been a C guru since about 1979. Pascal was neatly extended to make Delphi a coordinated object oriented package. C had some off-key bells and squeaky whistles duct-taped onto it, along with a mass of verbiage, to make it into an oddly-obscure dialect.

Musing... I wonder what my criteria are for a "good" language? It certainly has nothing to do with "where pointers are pointing", etc.

A good language certainly should not make a user "THINK about their code". That's a disaster, unless the language is directed specifically at teaching basic coding techniques, and has no other purpose whatsoever.

A good language is one that assists the person using it to produce an elegant solution in the context of the particular problem. Ideally, the person should have minimal effort involved in learning whatever subset of the language they need to produce the solution.

Good languages have their context. LISP likes AI. Forth likes process control. Bash likes operating systems. Java is odd, but prefers the web, for its platform independence. C++ sits well with nothing, although I guess it is as good for headaches as INTERCAL, which certainly is the language that makes you think most about coding. C# is much nicer. C is awfully ambiguous at times, but is good if you need something one step up from assembler. Assembler is appropriate for very tightly crafted inner loops and hardware access, but NOTHING else. Direct machine code can even be useful at times (most assemblers don't allow you to generate every instruction that the machine can execute... occasionally you have to break free).

==========

Incidentally, I'm confused as to what you mean by "a software wienie"? Wienie = weiner = sausage? Maybe it doesn't translate well into English... now there's a strange language! As in:
"yields falsehood when appended to its own quotation" yields falsehood when appended to its own quotation.


_________________
"Striking up conversations with strangers is an autistic person's version of extreme sports." Kamran Nazeer


0_equals_true
Veteran
Veteran

User avatar

Joined: 5 Apr 2007
Age: 41
Gender: Male
Posts: 11,038
Location: London

16 Nov 2007, 9:53 am

whitespace :)

My first language was pascal. It taught me a lot about programming. Next I learnt VRML because I was interested in CAD.

I would say Ruby is a good first language.



0_equals_true
Veteran
Veteran

User avatar

Joined: 5 Apr 2007
Age: 41
Gender: Male
Posts: 11,038
Location: London

16 Nov 2007, 10:51 am

How a language abstract is specified and how it can be currently implemented are two different things. There are many brilliant ideas that have never happened. Some aren’t feasible and some are.

People who say stuff like "that's not a 'proper' programming language..": a) what are they talking about 'proper'? b. they best be talking about the language itself because if not they should be more specific.

If you are you are learning your first programming language you want something that is going to give you a good grasp of the concept. Technically a language could be anything, but there are loose schools as well as concepts which would be fruitful for learning more.



CompSciMan
Hummingbird
Hummingbird

User avatar

Joined: 3 Nov 2007
Gender: Male
Posts: 22

16 Nov 2007, 11:15 pm

lau wrote:
Sorry, but you keep on plugging C++, which I believe is just about the worse thing that ever happened to programming.

Maybe I'm not experienced enough to understand how that could possibly be?

lau wrote:
A good language certainly should not make a user "THINK about their code". That's a disaster, unless the language is directed specifically at teaching basic coding techniques, and has no other purpose whatsoever.

When I say thinking about code, I guess I'm talking more about design and efficiency. To think about what your code is actually doing. I believe this is an essential part of programming. Nothing annoys me more than seeing poorly thrown together code. Yeah it may bearly work, but it's a shortcut to thinking. That's not to say I'm in favor of complexity, just the best possible solution. Perhaps it is because I have always worked on large projects where code and efficiency standards are at the highest possible levels.



Fuzzy
Veteran
Veteran

User avatar

Joined: 30 Mar 2006
Age: 51
Gender: Male
Posts: 5,223
Location: Alberta Canada

17 Nov 2007, 5:31 am

Lau certainly must agree about coding cleanly; I'd hazard a guess that he agrees about that. But if i read him right, i think he means that one shouldn't have to grind the flour to bake a cake. measuring it is enough.So to speak.

Also, What i mean is brought to example by you. You said

Quote:
Perhaps it is because I have always worked on large projects where code and efficiency standards are at the highest possible levels.


Now I think you will agree its more efficient when one person is used instead of two. A small team is more efficient, provided everyone can do the work. and thats the crux of it. its simply easier, and less error prone to type printf than to push registers to stack, point to the memory location and call an interupt.A good programmer shouldnt have to think about things like those; he stands on the shoulders of other good programmers(that make the language he uses).

Its a little hard to conceive, but the next level of programming will do that to C/C++, lisp, all the rest.

Perhaps a better analogy would be driving. you dont want to have to fuss with correcting your fuel flow all the time, you want to pay attention to where you are going. Other people have taken the chore out of doing that.



0_equals_true
Veteran
Veteran

User avatar

Joined: 5 Apr 2007
Age: 41
Gender: Male
Posts: 11,038
Location: London

17 Nov 2007, 7:42 am

If you want to think about programming you should learn how to do a schematic. You need to at least one how the system works to a lay person and another which is the complete functional aspect of the system.



ion
Velociraptor
Velociraptor

User avatar

Joined: 10 May 2006
Age: 42
Gender: Male
Posts: 476
Location: Sweden

17 Nov 2007, 7:58 am

I suggest Java or PHP.
Both have really good documentation: Java manual, PHP manual.

I'd suggest PHP for a newbie, because you don't have to deal with Object Oriented coding, unless you want to, which can be a bit confusing when you're just starting off.

PHP is like being downtown on a Friday night, high on LSD and with a VISA card without credit limit: You can do anything!

You can either use PHP as a command-line interpreter, or hook it up with a web server and do some web coding.
If you have access to a web server then maybe they have PHP there, in which case you can just get to it.

Open a .php document in your web server document root and write:
<?php
echo 'Hello World!';
?>
(Everything outside the <?php ?> tags will be interpreted as normal HTML.

Then open that page on your server with your browser.


_________________
Nae king! Nae quin! Nae laird! Nae master! We willnae be fooled again!


lau
Veteran
Veteran

User avatar

Joined: 17 Jun 2006
Age: 75
Gender: Male
Posts: 9,618
Location: Somerset UK

17 Nov 2007, 8:01 am

Some more random thoughts....

I'll admit to being a tad biased about C++. I just didn't much care for it when it came on the scene. I was already using stuff that "worked for me", and didn't see the point in C++, which seemed to preserve all the worse aspects of C and add verbiage.

What has just occurred to me is how there seem to be a lot of not-C++-lookalikes around, these days, all of which have their staunch supporters, but all of which (to me) look like near carbon copies of one other.

I thought this was quite apposite.

Then I found this, where I counted about 60 entries I have actually used. I found the one starting "Sh" quite amusing.

Back to the "real" world... out of shear curiosity, a few days ago there was a problem published on the alt.math.recreational newsgroup:

Give a nine digit number using the nine digits 1 through 9, such that the whole value is divisible by nine, the first eight digits form a number divisible by eight, the first seven digits form a number divisible by seven, and so on.

My C program for this was quite messy, didn't take long to write and got the desired results. It's down the bottom. Make of it what you will. It's a blend between a pure "sledge hammer" approach and algorithmic ideas that occurred to me as I coded it. The elapsed time between reading the problem and having the answer was something like an hour.

Someone else, "The Qurqirish Dragon", a little later, came up with a clear English language, argued solution, which involved merely a quick verification of half a dozen possibles for divisibility by seven.

However, even later, "Dana" gave:

Code:
fx[n_] := DiscreteDelta @@ Table[Mod[FromDigits[Take[n, j]], j], {j, 9}] ==
1
Select[Permutations[Range[9]], fx]

That is Mathematica. If you want to solve a mathematical problem, maybe using a language tailored to mathematics is a good idea.
==============================

Here's my C code, which I cannot suggest I'm proud of. It violates almost every principle I can think of. It's ONLY justification is that it works.
Code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>

int target = 0;

int main(int argc, char *argv[]) {
  if (argc != 1) target = atoi(argv[1]); {
  int dig1; for (dig1 = 1; dig1 < 10; dig1 += 2)
  if (dig1 != 5) {
  int dig2; for (dig2 = 2; dig2 < 10; dig2 += 2) {
  int num2 = dig1*10 + dig2;
  int dig3; for (dig3 = 1; dig3 < 10; dig3 += 2) {
  if (dig3 != 5) if (dig3 != dig1) {
  int num3 = num2*10 + dig3; if (!(num3%3)) {
  int dig4; for (dig4 = 2; dig4 < 10; dig4 += 2)
  if (dig4 != dig2) {
  int num4 = num3*10 + dig4; if (!(num4%4)) {
  int num5 = num4*10 + 5;
  int dig6; for (dig6 = 2; dig6 < 10; dig6 += 2)
  if (dig6 != dig4) if (dig6 != dig2) {
  int num6 = num5*10 + dig6; if (!(num6%6)) {
  int dig7; for (dig7 = 1; dig7 < 10; dig7 += 2)
  if (dig7 != 5) if (dig7 != dig3) if (dig7 != dig1) {
  int num7 = num6*10 + dig7; if (!(num7%7)) {
  int dig8 = 2 + 4 + 6 + 8 - dig2 - dig4 - dig6; {
  int num8 = num7*10 + dig8; if (!(num8%8)) {
  int dig9 = 1 + 3 + 7 + 9 - dig1 - dig3 - dig7;
  int num9 = num8*10 + dig9;
  printf("%d\n", num9);
  } } } } } } } } } } } } } }
  return 0;
}


_________________
"Striking up conversations with strangers is an autistic person's version of extreme sports." Kamran Nazeer


0_equals_true
Veteran
Veteran

User avatar

Joined: 5 Apr 2007
Age: 41
Gender: Male
Posts: 11,038
Location: London

17 Nov 2007, 8:10 am

Anyone done Objective C?



0_equals_true
Veteran
Veteran

User avatar

Joined: 5 Apr 2007
Age: 41
Gender: Male
Posts: 11,038
Location: London

17 Nov 2007, 8:22 am

ion wrote:
I suggest Java or PHP.
Both have really good documentation: Java manual, PHP manual.

Hmm :?

I wouldn't suggest PHP. Yes it is easy to learn, however it is an example of a very scrappy language. It doesn't exactly encourage good practice. Try reading somebody else's php script. Not great.

I'm not sure Java is the best choice either, though it replaced pascal as the common first language in schools for some reason. That era would be over.