Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Writing Code

 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Help!
View previous topic :: View next topic  
Author Message
Rich_b21



Joined: Wed Mar 14, 2012 9:51 pm
Posts: 32
Location: Near Ludlow

PostPosted: Thu May 03, 2012 11:44 am    Post subject: Writing Code Reply with quote

If I wish the write a some code how would this be done.

Would I write in terminal?

I am new to this so assume I know nothing.

Thanks

Richard
Back to top
View user's profile Send private message
Bruno
LXF regular


Joined: Tue Sep 18, 2007 7:07 pm
Posts: 139
Location: Cambridgeshire, UK

PostPosted: Thu May 03, 2012 12:41 pm    Post subject: Reply with quote

A text editor, such as KWrite, Kate, gedit (all graphical), vim or emacs (both command line), is a good place to start. They usually feature syntax high-lighting, which helps, and have specific settings to help with different types of code.

Also try an IDE (Integrated Development Environment) for your chosen language or a web editor for HTML.
Back to top
View user's profile Send private message
guy
LXF regular


Joined: Thu Apr 07, 2005 1:07 pm
Posts: 830
Location: Worcestershire

PostPosted: Thu May 03, 2012 7:42 pm    Post subject: Reply with quote

Depends on what the code is for, what language you choose, and whether you want to hand-craft code or would like a tool to help with some or all of the chores.

Please tell us more about your plans and dreams.
_________________
Cheers,
Guy
The eternal noob
Back to top
View user's profile Send private message Visit poster's website
Rich_b21



Joined: Wed Mar 14, 2012 9:51 pm
Posts: 32
Location: Near Ludlow

PostPosted: Fri May 04, 2012 10:36 am    Post subject: Reply with quote

I would like advice on were to start and with what programs.

Interested in Linux (Ubuntu, using since 2009)

Would also like to learn about networks , how to use them, to connect a say Windows computer to Linux computer though Ethernet.

Learn more about Viruses and how to prevent them from damaging any of my computers.

I subscribe to Linux Format since Nov 2011 and PC Pro June 2011.
Are the other sources which I can use?

Am interested in learning to use the command line in terminal.

I have installed from scratch New 80Gb HD & adding 4 times the memory on Dell 2.4 Dimension running Ubuntu 11.10 and reinstalled Windows XP on a HP Laptop, added 5 times the memory, replaced all the data and programes that the owner required. The same was done for another owner but this time I removed XP and replaced with Ubuntu 11.10 and replaced all the data she required.

I am a retried TV/Video engineer and have do some programming (well dumps) of Eproms in inside TV's as well as
Hex programe mod. (small)

look forward to your advice....

Richard
Back to top
View user's profile Send private message
Nuke
LXF regular


Joined: Wed Feb 09, 2011 12:11 pm
Posts: 134
Location: Chepstow, UK

PostPosted: Sat May 05, 2012 3:08 pm    Post subject: Reply with quote

I suggest you learn to use the command line for the more common operations before you tackle coding. In this you will also be learning more about the Linux's file organisation, something modern OS's try to hide. LXF 151 is somewhere to start, then buy O'Reilly's "Linux Pocket Guide" or similar as a reference for by your elbow.

You can get guidance on any command by typing <man command> but the result is so comprehesive that it can be confusing to a beginner.

Then decide on a programming language. An interpreted language is best to start with, such as Perl or Python. Don't attempt C, Java or Assembly as a beginner. All these languages all have a large range of functions, but you can get by with a small sub-set most of the time.

Then learn something about the chosen language. You can get guidance on any language on the Web, but I always like a printed book reference as well.

Then decide what you are going to write. Keep to simple things at first, first "Hello World!" and then eg a program to do back-ups - where you will probably be calling out to Linux with the system commands you learned at the command line (there are other ways to do that, but never mind those for now).

Then you write the program in an editor, such as Bruno suggested, save it as a file, and then from the command line you run it by calling up Perl (if that is what you wrote for) followed by the name of your program file, as in <perl myprogram>

You will certainly get loads of error messages, so you go back to the editor and look to correct them. Then you will realise just how excruciatingly fussy computers are about your logic.

That's it. Fttb, until you advance, anyway.
_________________
Unsolved Mysteries of the Universe No 8 :-
Why did they do away with sinks with integral splashbacks?
Back to top
View user's profile Send private message
guy
LXF regular


Joined: Thu Apr 07, 2005 1:07 pm
Posts: 830
Location: Worcestershire

PostPosted: Sat May 05, 2012 8:41 pm    Post subject: Reply with quote

Yes, the command line or terminal is a good place to start. Linux uses a command shell called BASH. You can do a lot with it, like setting up a network connection (or diagnosing why you just broke it!), downloading and installing AV software, etc. without ever writing a true program. And without it, you will probably never get your own programs to run.

However, by the time you are familiar with it you probably will have written a good few "shell scripts" - text files that do stuff. These files are genuine programs in their own way, though the language is geared to system chores rather than general-purpose computation. It will give you a feel for programming, though.

RUTE is a comprehensive guide to Linux at this level and is found on all LXF coverdiscs.

And by then too, you will know better where you want to take your programming life in future.

Go for it Smile
_________________
Cheers,
Guy
The eternal noob
Back to top
View user's profile Send private message Visit poster's website
Rich_b21



Joined: Wed Mar 14, 2012 9:51 pm
Posts: 32
Location: Near Ludlow

PostPosted: Sun May 06, 2012 12:28 pm    Post subject: Reply with quote

Thanks to you all for the info, I will be looking in those directions.


Thanks again,

Richard
Back to top
View user's profile Send private message
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Help! All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast