OSDev.org
https://forum.osdev.org/

Advice for novice programmers thread
https://forum.osdev.org/viewtopic.php?f=13&t=3320
Page 5 of 13

Author:  B.E [ Thu Sep 07, 2006 5:29 pm ]
Post subject:  Re:Advice for novice programmers thread

What I would say to new programmers is first love what you are doing. I mean if you don't like programming, don't do it. If you need something there are plenty of free software out there, if you need something specific, pay someone else to do it for you (hint hint, nudge, nudge) ;).

Second don't necessarily learn the language, learn the basic constructs of the programming. Moreover learn ifs, for, while, do..whiles, variables, arrays, etc. All languages have these basic functionality (i don't think lisp has these as such, but lisp has recursion).

Third you can never know to much about programming. Be ready to learn new techniques all the time. The IT industry is the fastest growing industry in the world.

Fourth, the old saying "practice makes perfect" applies. The more you practice programming the better you will become.

@Schol-R-LEA:

Quote:
Start off learning HTML markup before getting into an actual programming language; it is structured quite similarly to many programming languages, but is much easier to learn.


HTML has nothing to do with programming. Moreover, there is no flow control constructs of the language (except JavaScript, but it is a difference language).

If there was a order in which languages you should learn. It would be something like:
  • PASCAL - to learn the basics.
  • C - to learn pointers
  • Assembly - to understand how the compiler works
  • C++ - to learn classes
  • (A scripting language, i.e. awk, Perl, LISP) - to learn different methods of programming.
  • Learn a library(i.e Sockets, windows API, DirectX, etc.) - this aims to teach you that, most libraries work in the same way(i.e initialization, working with functions, and finalization).

Author:  TheQuux [ Sat Nov 25, 2006 4:45 am ]
Post subject: 

Here's my path:

1) Basic (on MS-DOS)... started too long ago to remember
2) Java (for about 6 months, when I was 9 or 10)
3) Visual Basic (for a year or two)
4) C++
5) UNIX shell scripting
6) Java (actually learned i this time)
7) C
8) Perl
9) PHP
10) FORTH
11) Basic LISP
12) SED (not sure whether it's turing complete, but you can do scary stuff with it.)
13) x86 Assembly
14) (in progress) ASL

I do NOT reccomend this to anyone.

Instead, get yourself a TI calculator, and learn to program it (Chapter 14 of the manual for the 83+, can't remember for the others)

If you don't find that fun, programming may not be for you... although, I will say, larger programs tend to get painful to write on the 83+...

Then, find a UNIX environment... for OSX users, open up Terminal. For Windows users, download Cygwin, and install the whole shebang. Learn shell scripting; it's not hard, VERY easy to debug, but it's a little different than TI-Basic

After you're comfortable with that, learn Perl. It gives you some exposure to data structures, algorithms, and so on; plus, it's indispensable for quick hacks. Plus, it gives you faster results than C for many things (IMHO).

Then, if you understand everything so far, and enjoy it, learn C. It's very useful, and almost required to get a job in this day and age.

When you know some C, learn assembly. Suddenly, all of the weird stuff in C will make sense.

Finally, learn some of the more interesting languages, like Forth, or RPL (the programming language on an HP graphing calculator), or LISP.


I personally learn by taking on a huge project and learning whatever it takes to finish that project... for example, I wrote JStatPlot to learn the Java graphics library, an ncurses clone to learn all about terminals, and an OS to learn assembly... (I don't reccomend writing an OS to learn assembly... I do know it pretty well now, though)

Author:  enrico_granata [ Sat Jul 28, 2007 4:11 am ]
Post subject: 

this is my path (I don't know if it was the best choice...it just somewhat occurred) :wink:

0) HTML
1) QBASIC
2) Visual Basic 4 (later did some VB6 programming)
3) very basic C++ (some MFC)
4) Java
5) back to C++ and some Delphi (can't remember anything now though :( )
6) XML and .net (especially C#)

Author:  AndrewAPrice [ Sun Jul 29, 2007 7:00 pm ]
Post subject: 

0) Commodore 64/128 BASIC
1) QBASIC
2) Some Corel programming language that doesn't exist and no body has heard about
2) HTML/PHP
3) C++
4) C#
5) standard C

I wasn't until after I went through C# as being my favourite language that I switched predominantly to C++. I still use C# for windows programs (I hate the MS API for managing windows and widgets, and strings are easier to deal with) for quick little tools, but I stay away from it when I need to write something performance critical.

Author:  AJ [ Mon Jul 30, 2007 3:15 am ]
Post subject: 

Similar here:

1) BBC Basic (was the BBC B called the Acorn too??)
2) QBasic
2a) Do batch files really count??
3) VB for DOS
4) VB progressing through Windows 3.1->98
5) Does HTML really count??
5) C / C++
6) C# and VB.NET
7) ASM (32 bit x86 and 8 bit Atmel AVR)

At some stage during this lot I quite liked Delphi, but I had a free magazine copy so could not distribute my compiled programs. I now use C# as my preferred Windows development tool (with #Develop IDE) and C++ and ASM for OS Dev.

Author:  JamesM [ Tue Aug 28, 2007 5:16 am ]
Post subject: 

0) 64k BASIC on a sinclair spectrum (woo!! those were the days...)
1) fastBASIC on an Atari STFM.
2) Java
3) C++/OpenGL
4) C++/WinSock
5) C# .NET (Someone paid me to learn and write in it. The only reason. honest.
6) Several billion other random languages I will never use again, including Ada95 (what a monstrosity), Scheme (like it, but not enough to use it over Ruby) and others.
7) Ruby-on-rails
8) low-level stuff - asm, etc.

And, of course, I learned the web technologies side-by-side with these.

Author:  Combuster [ Tue Aug 28, 2007 6:04 am ]
Post subject: 

Considering that having an idea of concept of several (unrelated) languages is a good thing, how about the following approach:

1. Java
(object oriented, easy, user-friendly, and simple applications can be written with the greatest ease, no mess with pointers memory management and the like, promotes good programming habits)

2. A scripting language (PHP)
to get an idea of the difference between interpreted and compiled programs, what hacked programs are and to get an idea of the usefulness of either.

3. A functional language (Haskell)
functional programming languages require a completely different mindset for writing programs, but are very useful for complicated logical tasks which are difficult to algorithmically perform. Programming habits from functional languages can be applied in imperative languages, resulting in an useful coding style.

4. A low-level language (assembly, C, or C++ )
To learn about pointers, manual memory management, unforgivingness of programs, and how the CPU actually works. Knowing both assembly and C (++) gives the programmer a good idea of how things work. C is difficult and not suitable for all programmers, but the previous experience will help a lot.

5. Touring
By now you can work with almost any language you encounter. Time to try things out and determine for yourself what suits your programming style best.

6. OS Development 8)
You will need a good understanding of how the processor and programming languages work before you can build the layer on which all of your programs are going to run. If you can write code in your sleep, you're ready :wink:

-----------
For my tour:
- Quickbasic
- Logo
- Visual Basic
- ZZT-OOP
- PHP
- Ti-83 Basic (I wrote most games in that)
- C(++)
- Java
- Haskell
- Assembly
- FreeBasic

Author:  pcmattman [ Tue Aug 28, 2007 4:11 pm ]
Post subject: 

Combuster wrote:
- Ti-83 Basic (I wrote most games in that)


I wrote a fractal program (Mandelbrot) in Ti-83 Basic. It would draw on the graph screen, so it had a nice resolution (92x62), but it crashed the calculator.

Author:  Alboin [ Tue Aug 28, 2007 4:46 pm ]
Post subject: 

Combuster wrote:
3. A functional language (Haskell)
functional programming languages require a completely different mindset for writing programs, but are very useful for complicated logical tasks which are difficult to algorithmically perform. Programming habits from functional languages can be applied in imperative languages, resulting in an useful coding style.

The thing I've been finding most difficult with learning Haskell is trying to think of practice programs to write in it. All of my projects are in C\C++, so it's not as if I can work on those.

As this is a programmer's advice thread, and this could be useful to any novice (So I'm not trying to hijack the thread or anything): Does anyone know of any good programming exercises for Haskell or the like?

Author:  Combuster [ Wed Aug 29, 2007 6:01 am ]
Post subject: 

pcmattman wrote:
but it crashed the calculator.

About crashing the calculator, try this program (big note: I dont have the thing here, so its purely from memory - if I'm even slightly off, it does nothing spectacular):
Code:
"Ans"->Str1
Str>Equ(Str1,Y1)
Disp Y1(0)

It should give a nice memory error, and an ever nicer error when you select goto. (free ascii chart :twisted:)

Alboin wrote:
Does anyone know of any good programming exercises for Haskell or the like?

From my own university work:
- Write a program that draws a calendar to the screen
- Write a program that computes the most efficient schedule given a set of plans or restrictions.
- Implement a Logo interpreter
Other interesting challenges:
- Sudoku solver
- Write a program that, given a logical formula, tries to build the proof

Author:  pcmattman [ Thu Aug 30, 2007 3:51 pm ]
Post subject: 

Combuster wrote:
pcmattman wrote:
but it crashed the calculator.

About crashing the calculator, try this program (big note: I dont have the thing here, so its purely from memory - if I'm even slightly off, it does nothing spectacular):
Code:
"Ans"->Str1
Str>Equ(Str1,Y1)
Disp Y1(0)

It should give a nice memory error, and an ever nicer error when you select goto. (free ascii chart :twisted:)
[/quote]

I get the memory error, then press "Goto" and get this:
Code:
"Ans"->Ans?


8)

Edit: when I say crash, I mean it turned itself off and when I restarted it it decided it would be fun to clear the RAM. Changes to my fractal program weren't stored anywhere else :(

Author:  crazygray1 [ Sun Jan 06, 2008 9:06 pm ]
Post subject: 

Path:
1.Java(tried a little)&HTML
2.C++/C
3.Another try a JAVA
4C#
3.x86 asm

Author:  AndrewAPrice [ Sun Jan 06, 2008 10:17 pm ]
Post subject: 

Alboin wrote:
The thing I've been finding most difficult with learning Haskell is trying to think of practice programs to write in it.


Xmonad was written in Haskell.

I have seen a lot of languages written in the 50's/60's/70's which are really limited in what they can do. I don't mean limited as in the structure and syntax of the language, but due to their nature of being tied down to a small collection of inbuilt instructions (e.g. print, getline, setpixel). While they may have been sufficient for the purpose of the language at the time, is it very hard to add new functionality and extend the language. I like languages which don't have inbuilt functions as such, but rather a library, which is written in the same language.

Author:  nekros [ Fri Mar 07, 2008 4:09 pm ]
Post subject: 

As this is advice for novice programmers, here's what I have to say:

    You can start out with C if you want, but it will be hard(I did it)
    Don't think that when you know a little you know everything
    Take time and do as experienced programmers advise not in Ideas but in learning
    Talk means nothing, don't say I can do this and that prove it

Author:  iammisc [ Mon May 05, 2008 10:12 pm ]
Post subject: 

Since everyone's listing the languages that they learned in order, here goes:
  1. QBASIC
  2. C++ (HUGE leap, I don't recommend it. It took me forever to realize what the hell anything was)
  3. C (Not a huge leap from c++)
  4. Perl (This was fun and reminiscent of basic with its $'s and @'s)
  5. Python(Woah... this was probably the most fun of my life)
  6. ASM(really gives you insight into the design of C)
  7. Machine Code(I'm writing a JIT so I'm learning this)
  8. Lisp(I'm in the process for learning it because I'm a relatively new Emacs user. Looks pretty cool)
  9. Haskell(Well I plan to learn it someday. I'm just too lazy. I really like the idea behind functional programming though. It's just a little hard to wrap my head around)

Page 5 of 13 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/