[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  Programming
. -> [Folder]  General
. . -> [Subject]  What to learn first?

What to learn first?

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Landus   USA  (6 posts)  [Biography] bio
Date Mon 02 Jan 2006 05:56 PM (UTC)
Message
I've been a 'computer geek' since I was four. I had a 26 MHz Packard Bell with Windows 3.1 to fool around it.

Now, I'm 17. I know alot more, but more towards the hardware found inside a computer and anything on that topic. I can't code at all.

I've recently had people ask me if I could learn, but I don't know where to go, more or less, what language I should learn first.

If anyone could help, it'd be appreciated.

"Rap is to music as color-by-numbers is to art." -- Me
[Go to top] top

Posted by Conner   USA  (381 posts)  [Biography] bio
Date Reply #1 on Mon 02 Jan 2006 10:39 PM (UTC)
Message
I'd say it mostly depends on what you're trying to learn programming for. If you're looking to code for a mud, C is a pretty good starting point.

-=Conner=-
--
Come test your mettle in the Land of Legends at telnet://tcdbbs.zapto.org:4000
or, for a little family oriented medieval fun, come join us at The Castle's Dungeon BBS at telnet://tcdbbs.zapto.org
or, if you just want information about either, check our web page at http://tcdbbs.zapto.org
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #2 on Tue 03 Jan 2006 01:00 AM (UTC)
Message
Or for beginners, download Lua and do some simple programming in that. Being interpretive it tends to catch most egregious errors and simply give an error message, rather than a crash which can be hard for beginners to work out the reason for.

There is a stand-alone Lua that will run under Windows, and you can edit the programs in any text editor (eg. Notepad) and then try them out using the Lua interpreter.

For example, download this file from the Lua site:


lua5_0r2_Win32_bin.tar.gz


Extract out to get lua50.exe, which you can copy to your Windows directory or somewhere in your path.

Then, start it up:


lua50


Try a "hello, world" program:


> print "hello, world"
hello, world
>


Do a "2 times table":


> for i = 1, 10 do print (i, i * 2) end
1       2
2       4
3       6
4       8
5       10
6       12
7       14
8       16
9       18
10      20
>


And so on. Have fun!


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Cash   USA  (626 posts)  [Biography] bio
Date Reply #3 on Tue 03 Jan 2006 04:18 AM (UTC)
Message
I would definitely second Nick's suggestion to start with Lua. When you feel like you have a good grasp and wish to move on try C. Once you have a good understanding of C you can move to C++. Of course at your age you will probably be able to find some college classes to aid you in your studies. Java is also quite common on the college scene (at least at my local college).

Some people don't prefer the C to C++ approach, but I'll stand by my argument that learning C can only help you learn C++. They really arent different languages like many people make them out to be (in my opinion).

Lastly, I would recommend getting a book on the language you choose. Books can be very nice to have, even if it is just for a reference. The internet is not always available and sometimes you don't have a computer near you to look up things or just read on topics.

You can find other various advice by searching the forums as well.

Good luck :)

~Nick Cash
http://www.nick-cash.com
[Go to top] top

Posted by Landus   USA  (6 posts)  [Biography] bio
Date Reply #4 on Tue 03 Jan 2006 05:40 AM (UTC)
Message
I do play one MUD, but the coding knowledge is just for being able to possibly help code simply programs for myself and friends.

My desktop computer is running XP, but my laptop is currently running Ubuntu, because I couldn't find a better package manager, and I kept getting a BusyBox shell when I tried Arch Linux.

And Gentoo is just plain crappy now.

When I get home from school, I'll get to work on getting what I need to learn Lua.

"Rap is to music as color-by-numbers is to art." -- Me
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #5 on Tue 03 Jan 2006 10:33 AM (UTC)
Message
You will be able to run Lua under Ubuntu, since it (like many applications) are readily available for Linux. The nice thing is that any programs you write in Lua will be able to be run *unchanged* under Windows Lua, unless you use some of the obscure "os" commands (like os.execute, which will do operating-system specific stuff).

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Landus   USA  (6 posts)  [Biography] bio
Date Reply #6 on Sat 07 Jan 2006 01:30 AM (UTC)
Message
I ended up looking at Lua, and it would be something I could learn, but, I've been helping a friend work on a healing system/auto-mapper for the MUD Imperian.

The project is on sourceforge under the project name IMTS. It's all open source, and from what my limited coding knowledge, it's coded in either C or C++.

Because of this, I rather I learn this language first. I have had experience in other language, and know how to go back and fix syntax errors and the such.

The problem with C/C++, I've never found anything that I can understand. I've got once C/C++ book from Borders that bascially has you type in code, then explain it. Problem is that I don't explain how it works once I get halfway into Chapter 1.

Has anyone had this problem, or know how to help?

"Rap is to music as color-by-numbers is to art." -- Me
[Go to top] top

Posted by Landus   USA  (6 posts)  [Biography] bio
Date Reply #7 on Mon 09 Jan 2006 05:11 AM (UTC)
Message
Anyone?

Or did I say something wrong?

"Rap is to music as color-by-numbers is to art." -- Me
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #8 on Mon 09 Jan 2006 06:38 AM (UTC)

Amended on Mon 09 Jan 2006 06:39 AM (UTC) by Nick Gammon

Message
It's hard to know where to start. IMTS seems to be a custom client interface to MUDs, correct me if I'm wrong. According to its page on SourceForge it is indeed written in C.

It is great that you want to learn to program, programming is fun and rewarding.

My advice to you, or to anyone else, however is that trying to modify a MUD client or server is not the best place to start, if you are just learning programming, let alone C.

You are much better off getting to know the basics, loops, variables, assignments, if tests, storing data in things like tables or arrays, and so on. If you learn C you pretty soon have to look at pointers, which are complex for a beginner, which is why I recommended Lua.

Quote:

I've got once C/C++ book from Borders that bascially has you type in code, then explain it. Problem is that I don't explain how it works once I get halfway into Chapter 1.


What can I say?


  • Find a different book that explains it better.

  • Get a friend to help explain the examples to you. Often a "real" person explains better to a book, as you can explain what you don't understand.

  • Take a programming course, at school, or adult-education, depending on your age.

  • Look for "how to program in C" web sites. There must be hundreds of them.


Quote:

Has anyone had this problem, or know how to help?


This question is so general it is impossible to answer. We all have had problems in the past, sure.

If you post a specific example (of code), and ask a specific question, I am sure someone will try to help.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Landus   USA  (6 posts)  [Biography] bio
Date Reply #9 on Wed 18 Jan 2006 11:51 PM (UTC)
Message
I couldn't find a Windows version of Lua at all.

Appears to only have it available for *nix.

"Rap is to music as color-by-numbers is to art." -- Me
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #10 on Thu 19 Jan 2006 12:08 AM (UTC)
Message
http://luaforge.net/frs/download.php/788/lua5_0r2_Win32_bin.tar.gz

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #11 on Thu 19 Jan 2006 12:11 AM (UTC)
Message
Use Winzip to unzip that file. It has a handful of files in it (in a subdirectory):


05/05/05  23:32                 36,864 bin2c50.exe
05/05/05  23:30                106,496 lua50.dll
05/05/05  23:32                 20,480 lua50.exe
05/05/05  23:32                 20,480 luac50.exe
               6 File(s)        184,320 bytes


To play with Lua, just run lua50.exe.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Landus   USA  (6 posts)  [Biography] bio
Date Reply #12 on Thu 19 Jan 2006 12:17 AM (UTC)
Message
Now to find out how to code in Lua.

"Rap is to music as color-by-numbers is to art." -- Me
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #13 on Tue 24 Jan 2006 09:12 PM (UTC)
Message
I strongly recommend the book 'Programming in Lua': http://www.lua.org/pil/. While it doesn't teach programming per se - it teaches Lua - it should be enough to get the hang of some basics.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


33,299 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]