The Naked Scientists

The Naked Scientists Forum

Author Topic: How do you make applications for the computer?  (Read 23091 times)

Offline Simulated

  • Neilep Level Member
  • ******
  • Posts: 7188
  • Thanked: 1 times
  • Simulated..What more do you needa know :P
    • View Profile
    • Facebook
How do you make applications for the computer?
« on: 24/01/2008 21:24:23 »
I'm considered the computer guy of my class yet I don't know how to make a program. Any tutorials out there that I haven't seen?

Thanks


 

another_someone

  • Guest
How do you make applications for the computer?
« Reply #1 on: 25/01/2008 04:28:58 »
It depends on the kind of application you want to write.

A simple application can be no more than a batch file (or, in the Linux/Unix world, a Shell script); or it can be as complex as a full GUI application using a language such as C++ or Java (or any number of other computer languages).

The first thing you have to do is have a clear understanding of what it is you want the application to achieve (this is the design phase).  More applications have failed because people did not understand what they were trying to achieve than any other reason.

The next phase is it code the program in some programming language.  Different programming languages have different strengths and weaknesses, so in the ideal world you would select one of the languages better suited to the type of application you are writing, but in the real world, other constraints often make that choice less than ideal.

Since you have no previous programming experience, it is probable best to start with a simple scripting language, where you can simply write a few lines of code, and watch them do something immediately, rather than write huge wads of well designed code, but then watch it all fail, and have to carefully debug which line is it that is causing the error.

For my purposes, if I am writing a very simple piece of code that does not need a GUI interface, then I would use a language called PERL, but you will need to download the PERL interpreter onto your computer (assuming you are running Windows - on Linux/Unix computers, PERL will normally be installed as standard) from http://www.activestate.com/store/download.aspx?prdGUID=81fbce82-6bd5-49bc-a915-08d58c2648ca

The download will include manuals that explain how to use the PERL language, but they will not teach you the basics of how to design a program and think about structuring a program.  Not sure offhand where one would find a resource to do that (when I was learning programming, there was no Internet to learn from, and a lot was learnt simply by doing it, and talking to more experienced programmers, and working in teams of programmers who would not tolerate bad programming practice).

You can use PERL/TK to write some rather clunky GUI programming as well, but it certainly is not the language I would choose to write GUI applications in (in fact, I would question whether PERL is an ideal language for writing very large applications in either, although some people do - but it is a very good language to write something small that you want up and running quickly).

Personally, if I am writing a GUI application, I would choose JAVA (although I have my reservations about the language).  There are many people who would argue that languages such as Visual Basic and Delphi will allow you to get a simple screen up and running quicker than Java, and to some extent they are right; but I find that once you get to the logic behind the screen, it is easier to use some thing like Java (not tried Delphi, so I may be being unfair on that, and I know a lot of good applications that have been written in Delphi).

But I would advise starting in the non-GUI world before venturing into the GUI world.  GUI may be nicer for the user, but you need to understand more about programming principles before you start coding for it.
« Last Edit: 26/01/2008 17:03:28 by another_someone »
 

Offline Simulated

  • Neilep Level Member
  • ******
  • Posts: 7188
  • Thanked: 1 times
  • Simulated..What more do you needa know :P
    • View Profile
    • Facebook
How do you make applications for the computer?
« Reply #2 on: 25/01/2008 21:41:53 »
Thank you George. I'm not exactly sure what I'd like to make yet, but I'll look at it all better over the weekend. Its been a busy week and I have lots of stuff to catch up on.

Maybe a Simulation Game?
 

another_someone

  • Guest
How do you make applications for the computer?
« Reply #3 on: 26/01/2008 00:19:56 »
Thank you George. I'm not exactly sure what I'd like to make yet, but I'll look at it all better over the weekend. Its been a busy week and I have lots of stuff to catch up on.

Maybe a Simulation Game?

Simulation games are complex (and usually, graphical in nature) applications.

I would not even consider doing anything as complex as that for your first application.
 

Offline Simulated

  • Neilep Level Member
  • ******
  • Posts: 7188
  • Thanked: 1 times
  • Simulated..What more do you needa know :P
    • View Profile
    • Facebook
How do you make applications for the computer?
« Reply #4 on: 26/01/2008 01:00:57 »
What about..Making a image viewer or somethinG?
 

Offline Simulated

  • Neilep Level Member
  • ******
  • Posts: 7188
  • Thanked: 1 times
  • Simulated..What more do you needa know :P
    • View Profile
    • Facebook
How do you make applications for the computer?
« Reply #5 on: 26/01/2008 01:27:18 »
Or maybe an addition to a program like WMP is that is possible
 

paul.fr

  • Guest
How do you make applications for the computer?
« Reply #6 on: 26/01/2008 15:41:38 »
Sim, you really need to know what it is you want to make, and the possibility that you can make it.
George, do you agree that you should start learning one of the basic programming languages first to get the basics and steadily progress from there?
 

another_someone

  • Guest
How do you make applications for the computer?
« Reply #7 on: 26/01/2008 17:20:56 »
Yes, I do agree totally.

The kind of programs being mentioned (image viewers, or addons for complex applications) are all very complex tasks that even someone with considerable experience would look at as a serious project.

With addons, the additional complexity is that you not only have to learn how your own code works, but also have to learn about the idiosyncrasies of the application you are making the addon for, and how the interface to that application works (often you get your bit right, but then realise you misunderstood something about the interface, or something does not work exactly in the way it was documented to work - all of which makes your own task infinitely more complex).

You have to remember that what you are trying to do is give yourself tasks to allow you to learn, so the nature of the task should reflect your level of skill.

Do the whole thing in small incremental steps, starting from the naively trivial, and in small increments until you gain confidence and skill, before trying some serious work.

Usually, the very first task a naive person learning programming will start with (I know it's boring - but you have to get through the boring bits first) is just to display a piece of text on the screen (the archetypal "Hello, World" program that just prints the text "Hello, World" on the screen).  It may be a meaningless program to write, but it is the first step to proving that you understand how to get even a trivial piece of code to be executed (and if you can't get that right, then it makes no sense to go headlong into the difficult stuff).

Next just write a small program that takes two numbers, adds them together, and prints the result.  Now you can prove you can get a program to do some work (even if only a small trivial bit of work).

Then write a small calculator program that allows you to enter a more complex series of numbers, and do different things with the numbers, and print out the results (all of this still as plain text, not as GUI windows applications).

When you have got there, if you want to start playing with simple GUI programs (again, starting with "Hello, World" before progressing to other things - that is something for you to judge if you feel ready for that).  Before you even start thinking about writing a GUI application, you will need to read up all about the interfaces required to make GUIs work (and this will depend on what programming language you wish to write for the GUI - it is very possible that you may wish to use a different programming language for the GUI than for the text based programming you will start with).
 

Offline Simulated

  • Neilep Level Member
  • ******
  • Posts: 7188
  • Thanked: 1 times
  • Simulated..What more do you needa know :P
    • View Profile
    • Facebook
How do you make applications for the computer?
« Reply #8 on: 26/01/2008 18:03:05 »
I might have missed it, but what kind of application would you reccomend for a person that hasn't done it yet?
 

Offline DoctorBeaver

  • Naked Science Forum GOD!
  • *******
  • Posts: 12656
  • Thanked: 3 times
  • A stitch in time would have confused Einstein.
    • View Profile
How do you make applications for the computer?
« Reply #9 on: 26/01/2008 21:20:27 »
I agree with everything George has said.

I started programming in 1978 (yes, computers did exist then!  [:(!] ). My background is databases and commercial systems (Financial, maintenance management, stock control, automated warehousing, building climate control. I was co-author of the loan control system used by the builders of the channel tunnel; consultant, analyst and project manager for the tunnel maintenance management system, and I designed the safety system for the tunnel - which worked perfectly when there was a fire!  [^] )

But with all that experience behind me I would still hesitate to attack programming graphics applications - especially games. As George said, graphics applications are complex and you need to learn the protocols & encryption for each graphics type.

If you want to write a fairly straightforward application that you could actually use, try a php/mySQL system to catalogue your MP3 files. I could design a mySQL database for it, so you'd only have to write the data input & display functions. It would be taxing enough to keep you interested - with plenty to learn - but you don't need any specialist knowledge to code it. Tackling something like that would give you a good grounding for other projects that you'd probably think of while writing it.

I recommend php because it's the most widely used language for interactive websites, it's fairly easy to learn the basics, but it's powerful enough to write large, complex systems. This forum is written in php with a mySQL database (so is my website & forum, and 99% of other forums on the web).

I'd be pleased to give you a few pointers and I dare say George would too.
« Last Edit: 26/01/2008 21:24:15 by DoctorBeaver »
 

another_someone

  • Guest
How do you make applications for the computer?
« Reply #10 on: 26/01/2008 22:55:00 »
I would disagree about using PHP as a starting point.  Nothing wrong with the language, but starting with a web based language puts another layer of complexity (far less complexity than a graphics based application, but still additional complexity) than you might wish for in the initial few months.

The other thing to take into account is that it requires setting up a server to run all of this on, or buying space on someone else's server.

Certainly, once you have got simple text based programming behind you, and if you are willing to set up a server (preferably that means having two machines, one as a client and one as a server, although you can run them both on the same machine), then running a PHP or PERL script as a web based application would be a good next step.
 

Offline DoctorBeaver

  • Naked Science Forum GOD!
  • *******
  • Posts: 12656
  • Thanked: 3 times
  • A stitch in time would have confused Einstein.
    • View Profile
How do you make applications for the computer?
« Reply #11 on: 26/01/2008 23:10:35 »
He could install JSAS under Windows. That has Apache, mySQL & php and is a doddle to install. It's what I use for development of php/mySQL applications and interactive websites.

I don't really see that it adds another level of complexity. He wouldn't need all the HTML or CSS formatting; the browser defaults would be sufficient. All he'd need from HTML would be <a></a> for the menu tags and a couple of forms. No matter which language he used, he'd have to have some kind of redirection from the menu, and a data input mechanism. Learning how to do that using HTML & php is no more complex than it would be in any other language (& a lot easier than some).

Plus, php could give him a gentle introduction to OOP which could prove very useful if he moves on to a language like VB, Delphi or Python.
« Last Edit: 26/01/2008 23:13:05 by DoctorBeaver »
 

another_someone

  • Guest
How do you make applications for the computer?
« Reply #12 on: 26/01/2008 23:24:36 »
The point is that a client/server application (even a simple web based application) is another set of configurations to worry about, and when your first program is not working, and you have no idea why not, the last thing you want to worry about is if you have a configuration problem with your server.

Start by keeping it as simple as possible, with the minimum of configuration issues.  First get that working, and then if you want to add the extra layer of complexity, you have a little more confidence that you can understand whether the problem is with your code or a misconfigurated server.
 

Offline DoctorBeaver

  • Naked Science Forum GOD!
  • *******
  • Posts: 12656
  • Thanked: 3 times
  • A stitch in time would have confused Einstein.
    • View Profile
How do you make applications for the computer?
« Reply #13 on: 26/01/2008 23:41:03 »
JSAS handles all the config. I knew practically zilch about Linux servers when I installed it, but I had it up & running in a few minutes and I've had no trouble whatsoever with it. Every error I've had has been down to programming (most commonly forgetting the ; at the end of a line  >:( ). I've not had to touch the Apache config at all.

Also, I code within the default php settings so I've not even had to worry about things like register_globals. Anyway, I doubt Ryan would code anything yet where he needed to know the contents of php.ini or whatever. The only time I've had to mess with php.ini so far was when I was writing a file uploader and I wanted to change the default max filesize.
« Last Edit: 26/01/2008 23:47:55 by DoctorBeaver »
 

Offline Simulated

  • Neilep Level Member
  • ******
  • Posts: 7188
  • Thanked: 1 times
  • Simulated..What more do you needa know :P
    • View Profile
    • Facebook
How do you make applications for the computer?
« Reply #14 on: 27/01/2008 03:49:51 »
Wow. I missed a little. Haha. I'm gonna need time to read that all..
 

another_someone

  • Guest
How do you make applications for the computer?
« Reply #15 on: 27/01/2008 16:51:45 »
Thinking a little more about this, another limitation with client/server applications is with regard to debugging - you can't use symbolic debugging tools on the server when you are running the client - whereas a standalone application you can debug with a symbolic debugger.
 

another_someone

  • Guest
How do you make applications for the computer?
« Reply #16 on: 27/01/2008 22:29:59 »
But, I suppose where I really started out with this issue of why I don't think that PHP is a good starting point is that the only way you can try something in PHP is to write a source file, save it to the server, then go over to the browser, try and run it, and maybe get something, maybe get nothing, maybe get a server error, maybe get a program error.

Which a language such as PERL or interpretive BASIC, you can just try a one liner there and then on the screen, without writing any files, and just get a feel whether the basic syntax of what you are writing is valid, and whether the one line will give the results you want - which can be very comforting for someone who has not even ever written a single line of program code.

OK, when the guy feels comfortable writing a few lines of code put together, then it will inevitably have to be placed in a file (I still think there is less complexity if you don't need to run the file on a server, but can run it immediately - but that may be something we will have to accept to disagree about - and as I said above, standalone programs can also use symbolic debuggers, although using symbolic debuggers can be an art in itself, even though they are enormously useful for hunting for bugs).
 

Offline DoctorBeaver

  • Naked Science Forum GOD!
  • *******
  • Posts: 12656
  • Thanked: 3 times
  • A stitch in time would have confused Einstein.
    • View Profile
How do you make applications for the computer?
« Reply #17 on: 27/01/2008 23:26:53 »
My IDE can execute the programs, so I can try them as I write them without resorting to a browser. I just point my IDE at php.exe & mySQL in the settings.

It also has an in-built syntax checker and can do a certain amount of auto-correction.

In any case, JSAS lists all your projects so you just click on the 1 you want and it opens the index.php (or index.html etc) file in your default browser. You don't have to bugger about entering http://localhost:85/blah/index.php in the browser address bar every time. Then, any time I add or alter code I just save it and click the refresh button. I don't find that overly onerous.

As for debugging, I find the errors thrown up by php & mySQL perfectly adequate for tracking down bugs without difficulty. Mostly, it's mis-spelling a table or field name or, as I said earlier, forgetting the ; at the end of a line. If you need to check your logic, you can do vardumps in php to track down where a variable is, or isn't, being assigned correctly.

Don't get me wrong, PERL is a good enough language (although it seems to be falling out of favour), but I think php would be the best bet looking longer-term.

Delphi & Python are OK too. They both have fairly easy syntax and complex applications can be built fairly quickly once you get the hang of coding in snippets. But if Ryan wanted to progress to an interactive website, getting a host with either of those wouldn't be as easy as a host offering php/mySQL.

Of course, he could always try Java or JavaScript but I haven't used either of those enough to be able to say how easy it is to build full-blown applications using them. I only ever use JS for adding nifty little goodies to website pages.
« Last Edit: 27/01/2008 23:30:01 by DoctorBeaver »
 

another_someone

  • Guest
How do you make applications for the computer?
« Reply #18 on: 28/01/2008 00:31:04 »
Yes, I have used PHP extensively, so I know all about vardump.

This is not really an issue between PERL and PHP (both are languages with their own strengths and weaknesses, and I can get equally frustrated with both).  My issue is whether one should start programming on a web based application, or start with a standalone application (at least until you are confident with something more than a one liner).

I don't have experience of JSAS, so when you say your IDE can run a PHP application without resorting to the browser, it might be that it is using the standalone version of PHP, which I have no experience in, so cannot comment on.
 

Offline DoctorBeaver

  • Naked Science Forum GOD!
  • *******
  • Posts: 12656
  • Thanked: 3 times
  • A stitch in time would have confused Einstein.
    • View Profile
How do you make applications for the computer?
« Reply #19 on: 28/01/2008 08:24:39 »
My IDE didn't come with JSAS; it's a separate program I acquired (ahem!).

JSAS comes bundled with Apache, mySQL, php & PERL although I do have php & mySQL as stand-alones too.

I take your point that in the initial stages a stand-alone language can be easier. But I don't really see that learning the syntax for a given language then, when you want to progress past the very basics, learning a different 1 is advantageous. Both php & PERL are fairly easy to get to grips with on a basic level, so why not go for the 1 that's going to be more use later on?
 

another_someone

  • Guest
How do you make applications for the computer?
« Reply #20 on: 28/01/2008 13:22:58 »
I take your point that in the initial stages a stand-alone language can be easier. But I don't really see that learning the syntax for a given language then, when you want to progress past the very basics, learning a different 1 is advantageous. Both php & PERL are fairly easy to get to grips with on a basic level, so why not go for the 1 that's going to be more use later on?

I don't disagree with any of the above.

The point is that I have no experience with using standalone PHP, so I really would not like to comment too much upon it, while web based PERL has actually been around longer than web based PHP.

Yes, PHP has some nice object oriented things, but even that is only somewhat half hearted (certainly it does not compare to object oriented programming in Java or C++).  Even PERL claims some slight degree of object orientedness when it deals with packages, but I grant you it is an even weaker implementation than PHP.  PERL 6 was meant to overcome those limitations, but too date PERL 6 is something that is more a promise than a product.

In terms of what exists and is used in the wider marketplace, although PHP is slightly more used in the web world than PERL (at least for newer projects - plenty of legacy projects use PERL), but there is very extensive use of PERL for non web applications (whether it be as a job control language, or as a text handling language), so overall PERL actually has a much wider and larger demand than PHP.

I am not arguing against starting off with standalone PHP - I just don't have any experience with using it, or with the tools involved; I am merely saying that if one starts with standalone PERL there is no reason one cannot still continue to use that in the web environment.
 

Offline DoctorBeaver

  • Naked Science Forum GOD!
  • *******
  • Posts: 12656
  • Thanked: 3 times
  • A stitch in time would have confused Einstein.
    • View Profile
How do you make applications for the computer?
« Reply #21 on: 29/01/2008 23:41:43 »
I know php's OOP capability is rather limited, that's why I said it would a good gentle introduction to it. It gives a simple, basic understanding of what objects are & how they can be used. As for C++, fer-git it if you're a beginner trying to teach yourself.

As for PERL being more widely-used than php, that may well be the case. But, from my own observations, there seem to be many more web hosts offering php than PERL. I also think the amount, and quality, of php tutorials available is superior to PERL.

I think an important factor in selecting which language Ryan should go for is what sort of programs he would like to write in the future. But, until he starts programming and gets some ideas, he probably won't know (which is the whole crux of this thread).
 

another_someone

  • Guest
How do you make applications for the computer?
« Reply #22 on: 30/01/2008 00:51:56 »
I know php's OOP capability is rather limited, that's why I said it would a good gentle introduction to it. It gives a simple, basic understanding of what objects are & how they can be used. As for C++, fer-git it if you're a beginner trying to teach yourself.

:) agreed.

Ofcourse, in terms of object orientedness, even JavaScript claims a certain amount, probably on par with PHP (although few naive JavaScript programmers are aware of the capabilities).

As for PERL being more widely-used than php, that may well be the case. But, from my own observations, there seem to be many more web hosts offering php than PERL. I also think the amount, and quality, of php tutorials available is superior to PERL.

My experience is there is not much difference between support for PHP and PERL.

In terms of online tutorials, I am not sure about this (the PERL documentation is actually not that bad in terms of tutorials), but in terms of online help (reference documentation, rather than tutorials), I do agree that PHP is superior to PERL.

I think an important factor in selecting which language Ryan should go for is what sort of programs he would like to write in the future. But, until he starts programming and gets some ideas, he probably won't know (which is the whole crux of this thread).

I do agree about this, but I suspect in the real world, he will probably have to learn quite a few languages anyway.

My temptation is initially to go for the short term solution, on the basis that we probably don't know what the long term solution is until we get further down the road.
 

paul.fr

  • Guest
How do you make applications for the computer?
« Reply #23 on: 30/01/2008 02:43:17 »
Is all of this (however interesting), not too much for a teenager with no experiance of any form of coding or programming?
 

another_someone

  • Guest
How do you make applications for the computer?
« Reply #24 on: 30/01/2008 03:18:45 »
Is all of this (however interesting), not too much for a teenager with no experiance of any form of coding or programming?

I am assuming that Ryan would have stopped reading after the first few posts - the rest being between Eth and myself.
 

The Naked Scientists Forum

How do you make applications for the computer?
« Reply #24 on: 30/01/2008 03:18:45 »

 

SMF 2.0.10 | SMF © 2015, Simple Machines
SMFAds for Free Forums