First Programming Language

Nixxon

Limp Gawd
Joined
Jun 28, 2006
Messages
149
So in my attempts to start my Computer Eng courses early and learn programming I've been looking into which language to start with. I've read the programming essay already and was just looking for a simple, well documented language. Since I have no programming knowledge I need something extremely basic.

I had started to think Java was would I would start with just to get my head used to the process of programming when I ran across this article.http://www.stsc.hill.af.mil/CrossTalk/2008/01/0801DewarSchonberg.html


This site has brought me to my next point

http://www.catb.org/~esr/faqs/hacker-howto.html Under the Learn how to Program section.
Regardless of the rest of the text which I'm not trying to accomplish, but am pulling programming information from it.

I was initially going to go with Java for a few reasons... one is its ease and the other reason is that someone I work with (Only for the next month till I leave) has programmed in it before and can help me a little. Now I think I should start with Python or C++.

Anyways what do you guys think of the essay written on the Pitfalls of the CS program and Java as a first language?

This is not a "What language should I learn as a first" but more a intellectual discussion on what you think.
 
As someone who learned C++ first, and then Java (and currently uses Java), my feeling is that I'm a much better Java programmer because of C++. Knowing C++ helps you appreciate what Java does for you so that it is not just a bunch of hand waving.

Standard disclaimers, this is just an opinion, your mileage may vary, etc.
 
Perl is a bit easier to start off on. I technically started with BaSH scripting and I'm actually converting my first BaSH script into a perl equivalent right now. I'm just starting off, but I'm already purchasing a few perl, java, and c++ books. Python is another somewhat elegant language that you could start off with, but I haven't personally looked into it much.
 
I would start off with Python. It's a higher-level language than anything based off of C, and you can focus on learning how to program versus just syntax. Python is really easy to pick up and makes implementing algorithms, etc pretty easy compared with Java or C++.
 
If you are in computer engineering, your first language probably shouldn't be Java.

The first thing you'll learn in Comp. Eng will likely be a form of Assembly, C/C++, or possibly even Python (used moreso in some introductory comp. sci courses). If you decide to take 2nd/3rd/4th year courses in software engineering, you will spend time dealing with Java and OO methodology.
 
I would start with python, then move to C, then up to c++. Python is a very good beginners language.
 
Thanks for the replies, I'm not really concerned with WHAT Language but why. I have decided on Python (Not related to anything from this forum post but I do appreciate the input).

Is it because Java is considered less theoretical in its application than another type?

Just wondering WHY it is Java isn't a good choice.
 
Java isn't as low-level as C++ can be. If you are a comp. engr. then you're essentially working on top of the bare silicon. The Java run-time does not exist unless you invent it for your architecture/device. This means either coding one up (in a language like C or C++ or Ada), or implementing it in the hardware (probably MUCH more difficult), or getting a Java compiler to spit out native code.

Point being, you can't use Java as soon in the device development process as you can a native-code language.

That being said, use whatever you find intuitive. You're not being paid for this, and you are doing this to learn programming. It should be what is easiest for you.
 
You might want to read this essay, which describes some of the choices you might make as you get started.


There are lots of opinions in this field. Some are sensible, some aren't. You should read them, ifgure out which are sensible, and figure out which apply to you. You're asking why java might not be appropriate, but I think it's up to the article you read to give you the reasons that article doesn't recommends Java not be used as a first language. We can't put words in the authors' mouths. When I skimmed the article, it seemed rather thin on presenting its reasoning.

But you're also not telling us much about why you want to become a programmer. What is it that you'd like to do? There are some development goals which are easier to reach in certain languages. If you want to write games, you can do it in any language. If you want to write a 3D game, you're probably best off using C++, for example. IF you want to learn simply to learn, you'll want to make your choice over a different set of goals; do you want to control hardware and do simple electrical projects? Do you want to just write some code and learn algorithms? What are your longer-term goals?

Bluntly, most people who come through this forum with your question just disappear; we never hear from them again. Will you be different? What's going to hold you to your goals?
 
I learned Java first and it only hindered my improvement. Id say go with Python or C.
 
. I've read the programming essay already and was just looking for a simple, well documented language.

This is not a "What language should I learn as a first" but more a intellectual discussion on what you think.

You might want to read this essay, which describes some of the choices you might make as you get started.


There are lots of opinions in this field. Some are sensible, some aren't. You should read them, ifgure out which are sensible, and figure out which apply to you. You're asking why java might not be appropriate, but I think it's up to the article you read to give you the reasons that article doesn't recommends Java not be used as a first language. We can't put words in the authors' mouths. When I skimmed the article, it seemed rather thin on presenting its reasoning.

But you're also not telling us much about why you want to become a programmer. What is it that you'd like to do? There are some development goals which are easier to reach in certain languages. If you want to write games, you can do it in any language. If you want to write a 3D game, you're probably best off using C++, for example. IF you want to learn simply to learn, you'll want to make your choice over a different set of goals; do you want to control hardware and do simple electrical projects? Do you want to just write some code and learn algorithms? What are your longer-term goals?

Bluntly, most people who come through this forum with your question just disappear; we never hear from them again. Will you be different? What's going to hold you to your goals?

First off, I did read the essay, several times :). Second I wasn't asking WHAT language per say, but why. My reasoning was to learn more about why people recommend one language over another. The reasoning for not having Java as a beginners basic seemed a little thin to me as well which is why I wanted another opinion on it.

My goal is to complete a degree in Computer Engineering and hopefully continue onto a masters in networking. I don't want to program to become a wiz programmer and I'm satisfied with writing simple programs. Programming as of right now is not much of a passion. I would prefer to design computer circuits. I want to program Ardunio kits right now. So controlling hardware in a nutshell.

The only problem I have with programming is that I lack creativity. I have a few ideas in mind that I would like to start to program, but I don't know the difficulty of them. So right now I'm just working through teaching myself Python with some websites.
 
Having started with C++, I think it's made every other language I've looked at easier. It's not as intricate as Java, and it's no as brain-dead as VB.

And all I can say is, you need to start with APL! :p (If you have a deathwish, that is...)
 
First off, I did read the essay, several times :). Second I wasn't asking WHAT language per say, but why. My reasoning was to learn more about why people recommend one language over another. The reasoning for not having Java as a beginners basic seemed a little thin to me as well which is why I wanted another opinion on it.

I think the essay gives you lots of answers about this. There are people who give religious arguments--arguments which just reflect thier biases, and not much more. I think that might be true of the paper you linked to, since the authors are both people who work at a company that makes ADA compilers and tools, and are involved in government contracting. More telling than that, though, is their lack of substance.

The other arguments are about suitability for purpose. It's easier to do low-level things in assembler or C/C++ than it is in Java or one of the .NET languages, for example. Some languages have better tools or library support than other languages; C# has good database connectivity classes, for instance, but they're harder to find for C++. Some language have better customer support or documentatoin. You sure could write a very fast website in C++, but you won't get much help from books or other people. If you use PHP, you'll find no shortage of resources.

My goal is to complete a degree in Computer Engineering and hopefully continue onto a masters in networking.
Completing degree programs isn't a goal; it's means to an end. Do you want to get a job? To do something else? Make certain kinds of products, do certain kinds of work? I'd urge you to think deeply about completing a masters; it puts a long time between you and your time productively earning money in the job market, and it doesn't guarantee a higher salary or a better position.

I don't want to program to become a wiz programmer and I'm satisfied with writing simple programs. Programming as of right now is not much of a passion. I would prefer to design computer circuits. I want to program Ardunio kits right now. So controlling hardware in a nutshell.
How does a masters in networking get you closer to this goal?

The only problem I have with programming is that I lack creativity. I have a few ideas in mind that I would like to start to program, but I don't know the difficulty of them. So right now I'm just working through teaching myself Python with some websites.
If you start investigating the goals you have, you'll quickly be able to ascertain their difficulty. If you don't start, you'll never know.
 
Here's WHY you might want to avoid Java at first:

As a computer engineer, you will spend a lot of time interacting directly with hardware very early on in your education. As a new student to the program, you'll be learning about computer hardware, how it works, and how to interact with it in your programs. For this, you need to use a language that gives you this low-level access to the hardware.

C is a good language to use if you specifically require access to hardware. C++ gives you some of everything. It has the low-level hardware access capabilities of C, and has support for object-oriented design like Java. Java is inherently OO and doesn't provide hardware access.

Java is specifically designed to prevent interaction with the hardware. A compiled Java program runs off of the Java Virtual Machine. To oversimplify things for the sake of making a point, you can think of the Java Virtual Machine as a "virtual computer". Your Java application is compiled into bytecode, a set of executable instructions for the Java Virtual Machine. These instructions are then mapped to instructions that are supported by the base operating system and/or hardware.

This is the magic behind Java's portability. In theory, your compiled Java code will work on any computer/device that can run the Java Virtual Machine, as it determines how your application will talk to the base hardware underneath. For this reason, you CANNOT access hardware in your program.



To be honest, I would recommend figuring out what you'll be using in your 1st year courses and learning that. I'd be surprised if it wasn't one of C, C++, or Python. You might as well get a head start on your education... 1st year comp. eng. is a killer.
 
Does Python allow direct intraction with the hardware?
 
python has a nice interactive interpreter, so it can execute what you type, each time you hit enter. I would think that would help greatly when first starting programming. I even use the python shell to test out some lines of code before i put them into a larger python module.

Python also doesn't have as much extra structure / fluff that java or C++ do. You can get started doing things quicker instead of just doing lots of reading about header files, imports, classes, etc.

Once you get the hang of python, i'd move on to java or c++ though.
 
Completing degree programs isn't a goal; it's means to an end. Do you want to get a job? To do something else? Make certain kinds of products, do certain kinds of work? I'd urge you to think deeply about completing a masters; it puts a long time between you and your time productively earning money in the job market, and it doesn't guarantee a higher salary or a better position.

How does a masters in networking get you closer to this goal?

If you start investigating the goals you have, you'll quickly be able to ascertain their difficulty. If you don't start, you'll never know.

First of all I'm already in a career in the Military as a electronics technician. So my schooling will all have to be online courses. I'm stationed overseas. I'm planning on completing computer engineering through Devry. Thus the time earning money on the job market for me is a moot point. This is something that is 10 years in the making. I plan on finishing 20 years in the military. So my school will be building on the practical technician knowledge I have now.

My GOAL is to make good money in a innovative field that is challenging and technologically forward. I don't have a VERY specific goal, I don't have large amounts of exposure to the computer industry but right now I'm very interested in hardware (to include programming hardware) and networking (more specifically network security).
 
Does Python allow direct intraction with the hardware?

I don't think so. I don't know much about programming OR hardware so I'm just trying to get my foot in the door with something well documented and easy to learn.

Ardunio is the only language that I currently am familiar with that has direct software interaction and I've read it resembles C++ and Python. I know this is a very naive thing to say.
 
Does Python allow direct intraction with the hardware?

As far as I know it doesn't. I didn't exactly make that clear earlier. I discouraged Java because it didn't permit direct interaction with hardware.

I didn't really suggest Python... I just mentioned that it might be used in one of his early courses, making it worthwhile to learn. I know that a growing number of computer science programs are opting to teach Python... I don't know if the same holds true for computer engineering courses. A lot of it would depend on the curriculum. I know that my university offers seemingly redundant courses with high levels of crossover. The only major difference (at a glance) is in the course code, which categorizes it under a specific program (ie we have OO methodology and programming courses for IT students, CENG students, and comp sci students).

Courses related to Java would be specific to software engineering, and might pop up in later semesters as optional courses.
 
I think my courses are for the most part C and then delve into very basic java. But C for the microcontroller/hardware portion.
 
Does Python allow direct intraction with the hardware?

It does, through system memory-mapping instructions.

But to manipulate internal registers you'll have to use a different language unless said registers are mapped into memory on your system.

If you want to touch the hardware, this is far from the simplest language to do it in.
 
Last edited:
It does, through system memory-mapping instructions.

But to manipulate internal registers you'll have to use a different language unless said registers are mapped into memory on your system.

If you want to touch the hardware, this is far from the simplest language to do it in.

I'm just trying to learn the basics of language rather than a specific one. Python from what I have read is similar to C++ and therefore Ardunio which is a hardware language for kits.
 
I think pursuing some projects with Ardunio is your best bet. But I'm still not sure I understand the reasoning behind your goals.
 
I'm just trying to learn the basics of language rather than a specific one. Python from what I have read is similar to C++ and therefore Ardunio which is a hardware language for kits.

Python has very little in common with C++ beyond basic control syntax.

In fact, their commonality ends pretty much after establishing the fact that they are both programming languages that support the same primitive types.

I'm also unsure what a "hardware language" is, unless you're referring to something like Verilog.

I'm not sure what to tell you. You want to know why to learn a certain language without saying why you want to learn a language or what projects you intend on persuing. If all you want to do is tinker with microcontrollers, the kits you described would be fine, BASIC Stamps would be fine (programmed in BASIC), Javelin Stamps (programmed in Java) would be fine, Rabbit microcontrollers (programmed in Dynamic C) would be fine, something from embeddedarm.com (programmed in just about any language you could imagine) would be fine, and there are a ton of others as well.

For a beginner, simpler is better. The kits you mentioned are probably simple. The BASIC Stamps are simple. With a good reference, programming a PIC in assembly is simple.
 
I think pursuing some projects with Ardunio is your best bet. But I'm still not sure I understand the reasoning behind your goals.

I don't know enough about the computer industry to specify what I want as a job. I just know I'm interested in Computer Eng.

So for that, my goal is complete computer eng degree. I'm really interested in programming hardware and learning software programming as well.
 
Python has very little in common with C++ beyond basic control syntax.

In fact, their commonality ends pretty much after establishing the fact that they are both programming languages that support the same primitive types.

I'm also unsure what a "hardware language" is, unless you're referring to something like Verilog.

I'm not sure what to tell you. You want to know why to learn a certain language without saying why you want to learn a language or what projects you intend on persuing. If all you want to do is tinker with microcontrollers, the kits you described would be fine, BASIC Stamps would be fine (programmed in BASIC), Javelin Stamps (programmed in Java) would be fine, Rabbit microcontrollers (programmed in Dynamic C) would be fine, something from embeddedarm.com (programmed in just about any language you could imagine) would be fine, and there are a ton of others as well.

For a beginner, simpler is better. The kits you mentioned are probably simple. The BASIC Stamps are simple. With a good reference, programming a PIC in assembly is simple.

I just want to further my knowledge of computers. Programming hardware and software. Ardunio projects seem like a good starting point to learn the hardware portion of programming. Python seems to be a good starting point to learn how to program period.

Edit: I've spent a few hours reading through some Ardunio programming manuals and how-to's. It seems pretty interesting from what I was poking around with and I guess its very similar to C.
 
Last edited:
My vote is python first, then C, then assembly, then a functional language ( but you don't have to plan that far ahead).

My reasoning is very simple. Python is great for prototyping (not the EMCA prototype). What I mean by prototyping is taking an idea and getting it into code. Python makes this very easy, and the syntax does not get in the way at all. The next step for a prototype is usually a speed boost. This is where C comes in handy. Assembly is useful for incorporating into C, and functional languages teach different ways of thinking of problems.

I do more small projects, and I find I actually finish more projects (i.e. less abandoned ideas) if I follow the python-> C -> whatever else is needed methodology.

Plus I don't like Java, it gets in the way of prototyping cause it tries to prevent badly written code, and it;s not good for speed because C is faster (most of the time).
 
My goal is to complete a degree in Computer Engineering and hopefully continue onto a masters in networking. I don't want to program to become a wiz programmer and I'm satisfied with writing simple programs. Programming as of right now is not much of a passion. I would prefer to design computer circuits. I want to program Ardunio kits right now. So controlling hardware in a nutshell.

The only problem I have with programming is that I lack creativity. I have a few ideas in mind that I would like to start to program, but I don't know the difficulty of them. So right now I'm just working through teaching myself Python with some websites.

For embedded systems I would suggest starting with either C or some sort of RISC assembly. Many C development environments will let you do in-line asm as well, which would make learning both a much simpler task.

See if you can get your hands on a PIC, 8051, or other RISC development board. I'd send you my 8051 development board, but I toasted it a little while back.
 
I think c++ would do just fine in learning the basics plus it would likely be something you'd see in a CE major
 
If you are the type of person that likes to put their foot in the water first before going swimming, then walks in through the shallow end, finally making it to the deep end - then go Python/Perl -to- Java/C++ -to- C.

If you like to jump right into the deep end without touching the water then start with C.

Or if you're bold enough to jump off that 50ft high dive your first time swimming then start with Assembly.
 
I'm having a hard time understanding why anyone would recommend perl as a first language. I'm not questioning it's usefulness, but rather it's effectiveness in teaching the basics.

C++ or Java would be my recommendations to anyone just starting out. Java, especially, can give you some impressive returns for a beginner. Plus it covers most of the fundamentals.
 
Edit: I've spent a few hours reading through some Ardunio programming manuals and how-to's. It seems pretty interesting from what I was poking around with and I guess its very similar to C.

Arduino *is* C, just with a bunch of cuddly API to make it a little easier to use. All the magic is in the IDE and library, under the covers it's just an Atmel AVR and GCC compiling plain old C code.

I think the platform is a bit overpriced and overhyped, but it is quite good. You can get some basic projects under your belt using the cuddly Arduino API, and later use the same hardware but transition to 'bare' C on the AVR. I'm not sure how useful Arduino itself is other than to get a bit more familiar with the hardware, once you get fairly comfortable I would recommend you ditch it and switch to working directly with avr-libc or even assembly. You can also reprogram the hardware to be a programmer for other AVR chips, which you can purchase for cheap and start fooling around with circuits of your own design.

If you're going to choose one path to go down, this one seems like a good choice to me. It's pretty easy to get started, but can lead you smoothly into learning quite a lot of the basics that are important to a computer engineer, and likely involves a lot of the sorts of problems you're likely to be asked to solve in the real world as well.

For learning to 'program', ie. algorithms, software layout and so on, I think Python is close to ideal. It has a simple consistent syntax that is quite intuitive, supports pretty much every style of programming at least reasonably well, a good community and large, well documented library, and has strong tools for experimenting/RAD (the interactive shell and IDLE). I'm not really a fan of Perl for newbies either, the syntax is pretty arcane and there are too many 'special variables' and quirks that I think make it relatively difficult to learn even for an experienced programmer, it's quite different than most other general purpose languages. It's the first thing I turn to for any text processing task and a lot of simple scripting, and excels at that, but it wouldn't be my first choice for general purpose use and certainly not for teaching.
 
So far I've just been reading Arduino tutorials without actually using the board. Just digging through code and learning. Its very interesting problem solving. I can see how you use math to solve problems and program stuff. Its very interesting and complex. I can see how you need to think creatively and abstractly to create things.

This is what I've decided to go with. I'm sure I'll outgrow the boards but I think its holding my interest and teaching me the thinking behind problem solving using programming. That seems to be an important key to a first language from what I've been reading.
 
Well really all depends on what you want to use your first language for.

From a stand point of where I am, (just started college)

I picked up PHP back in high school and got a few jobs with it too!
anyways, What I found going to college and them saying we use JAVA for our classes. I was ok at first with the idea but when I got farther into the class I started hating it, due to the fact that I had to load all resources. and it wasn't as forgiving.

So from my standpoint I wish I would have started with a stricter language (Java, C, C++ etc...) instead of a forgiving language (Python, PHP, etc...)

It may be harder to start off learning a strict language such as Java or C but in the end it may pay off when later down the road you have to/want learn another language that is strict or even forgiving.

So what im trying to get at is right off the bat you are learning that you have to load everything, define what variables are what and the values they can hold and what not. So later down the road its easier to not have to define everything if you were to switch to Python, PHP or some other forging language.

Now from the other side of the fence. (where I am)...
Starting with a forgiving language... well for one its easier to learn and guess what forgiving! lol. Anyways I know a bit more about this side since this is where I am currently.
I learned PHP as my first language and am currently diving into Python and Perl (basically a change in syntax and not structure)
And my first 2 semesters of college I took some CS classes (intro to programming or something like that) either way they used java. at first I liked it, but then it just became a pain when having to define data types and converting them and a whole ton of other shit. It got tiring very fast. And I eventually ended up failing the classes due to no motivation to program that crap (in my mind it was crap).

I am in no way hating on Strict languages and I understand their purpose but coming from a forgiving language it was a bit difficult for me to just start wanting to define everything.

Hope this helps a bit.

*note I may have used some improper terminology with strict/forgiving. So forgive me, but it was to clarify it in simple terms
 
Nixxon, from what you wrote so far, I'd say you might get a chance to work with process control. If you don't think so or you've dealt with some, then perhaps what I write below won't be useful to you. But if it's an option for you, then I'd suggest looking into C, Matlab and Octave or SciLab.
C you might need if you'll ever need to write a device driver - I almost had to and it seemed the most reasonable language to do it in was C. I avoided it, though, as the pay would be too small so I would be doing it mostly for the experience. That wouldn't be too bad, but they'd probably be expecting me to provide support, most likely for free. I've done that a few times, not recommended. You give them a finger, they'll want the whole hand if you're not assertive enough.
Matlab is often used in by universities, at least around here. However, from the few practical exercises with real hardware we had with it, you can use Matlab with appropriate device drivers that have a Matlab interface to control devices such as fans, lights, valves, etc. I don't like the language, but its performance is good for e. g. matrix operations
Octave/SciLab could be interesting for you as free alternatives (to a certain extent) to Matlab.

Some say that Python can be used for some tasks Matlab can, but I haven't tried it yet, so if you're into Python already and process automation is a possibility for you, then you might have something to look into.

I don't do process control now, even though I've studied it at a university - when I found out it wasn't what I wanted to do (I blame it on the lack of specific information given out by the department and most of all structure of study that was in use at the time), it didn't matter and I finished the school anyway..
 
I started on assembler and VHDL combo, then moved to C/C++ for compiler design and then moved to Java / C# and C++ for using at work.


The only usefulness of learning C++ was that I used it on one project in past year and never again. No other benefits.

Java and C# are their own languages with their own little habits and are quiet different from C++.

One thing to note, after doing this for a long time, the biggest thing is not knowing the syntax but knowing the hundreds of little poorly documented or undocumented library calls, performance optimizations, nifty tricks that only come with experience of developing on that specific platform.

The language that you start with matters very little actually. I like Java the most so I'll recommend that :D
 
Wow you guys are hard core. For a guy that had not programmed before, wanting something easy to learn , every recommendation I have seen is setting him up to fail. (Well simple PERL is not bad) but C ??? Jezus.

Basic or Fortran maybe ?

Looping
conditional statements
assignment
simple sub-routines.
operators


thats ALL he needs for a first cut. KISS !!!!!!!!!!

Once the above concepts are understood all that fancy schmancy stuff can easily be picked up as 90% of it is just fancy words for enhanced variations of the above.

eh, but I dont know nothing, carry on.
 
As an Amazon Associate, HardForum may earn from qualifying purchases.
Back
Top