Be Excellent To Each Other
https://www.beexcellenttoeachother.com/forum/

Programming
https://www.beexcellenttoeachother.com/forum/viewtopic.php?f=3&t=293
Page 2 of 3

Author:  WTB [ Wed Apr 09, 2008 19:08 ]
Post subject:  Re: Programming

I do rather like your new signature, CUS :)

Author:  Anonymous X [ Wed Apr 09, 2008 19:48 ]
Post subject:  Re: Programming

Stuart Ashen wrote:
Nothing ever dies in the world of computers, does it?
I know. I've got something from 1995 on the web somewhere still. Which is kinda cool, I guess. :)

Anyway, programming. It's the one thing I can't get my head around, despite having used computer for a long time and since a young age - can't even manage HTML. What is the knack to learning programming? Oh, and where do people learn it generally, could it be that as I've never taken any sort of computer-y qualifications or courses (not even GCSE IT) that I'm at a disadvantage?

Author:  Sledge [ Wed Apr 09, 2008 20:14 ]
Post subject:  Re: Programming

BlitzMax is fairly lovely -- a nice take on object orientation without the brackets 'n' braces stylings of the c-alikes. Not free though.

Author:  CUS [ Wed Apr 09, 2008 20:17 ]
Post subject:  Re: Programming

Anonymous X wrote:
can't even manage HTML

HTML isn't a programming language. :nerd:

Author:  Dudley [ Wed Apr 09, 2008 20:38 ]
Post subject:  Re: Programming

jonarob wrote:
I see what you're saying certainly, but I'm not really interested in a quick product. I want to know a good, useful language that will set me up to understand any of the others I may want to learn.


Personally I feel if you go off an do VB etc you'll be ultimately wasting your time, doing simple things in c# is not tricky and help is always a google away. Plus it's intelisense and autocompletion is absolutely top notch. I don't see how a webby language like php is remotely helpful to you and all the people pushing their pet niche language are fine and all, but you'll be able to apply it to fuck all.

Quote:
So does everyone here know how to fucking code? This is why I want to learn. I feel like a right spack for not knowing something that everyone else seems to.


I hope so, they pay me the medium bucks to do so.

Author:  tossrStu [ Wed Apr 09, 2008 20:55 ]
Post subject:  Re: Programming

Image

Author:  CUS [ Wed Apr 09, 2008 20:56 ]
Post subject:  Re: Programming

Dudley wrote:
I don't see how a webby language like php is remotely helpful to you.

He needs to learn about functions and variables and arrays and strings. PHP is the fastest way there. Then, he can think 'Right... now what do I really want to DO, now that I have some idea of how I go about it?', or whatever. C# is surely the best language for him to actually latch onto firmly, but learning PHP first can get him there faster. Yes.

It is a c-style language with a very similar syntax to C#, Java, C++ etc. It's a language that lots and lots of people know - and which even if they don't, they can easily help him with, due to its clear syntax. C# on the other hand is still too new for some, or just not of interest, with some unique keywords. Also, intellisense and that is great and all, but that mostly just teaches him how to use Visual Studio, and to be potentially confused by OO.

Getting going only RIGHT NOW JONAROB BABY only requires downloading XAMPP, a decent free text editor - Notepad++ is my current fave - and he can start on it right away. Jonarob could literally have learned the basics of programming in a day or two. He can see results on his screen in a useful fashion that requires no compilation to extra steps. Plus, he can say he 'knows PHP' and thereby piss off proper PHP programmers who expect to be paid well to do amazing stuff, and rarely, sadly, ever are. Don't get a job doing PHP, jonarob.

edit: fuck's sake - or what tossrstu said far more succinctly :D

Author:  Dimrill [ Wed Apr 09, 2008 20:57 ]
Post subject:  Re: Programming

Winnar! :DD to Stu, obv.

Author:  WTB [ Wed Apr 09, 2008 21:07 ]
Post subject:  Re: Programming

I've fished out my "A Level Computing" book (stolen from college and never returned), and I'm learning the basics of programming with the wonderful TURBO PASCAL.

Turns out, I already know most of this, so I must've been paying attention.

Author:  Sledge [ Wed Apr 09, 2008 21:24 ]
Post subject:  Re: Programming

Dudley wrote:
I don't see how a webby language like php is remotely helpful to you and all the people pushing their pet niche language are fine and all, but you'll be able to apply it to fuck all.


A lot of the script-like languages make picking up the principles of OOP a bit easier, that's all I'd say -- I'm glad I learned OOP with BlitzMax as applying the knowledge to lower-level languages is a cinch. Can't really argue about PHP, though -- that would be a really odd first language. 8) (I'm trying to find excuses to use these most excellent new smilies.)

Author:  mrbogus [ Wed Apr 09, 2008 21:26 ]
Post subject:  Re: Programming

CUS wrote:
Dudley wrote:
I don't see how a webby language like php is remotely helpful to you.

He needs to learn about functions and variables and arrays and strings. PHP is the fastest way there. Then, he can think 'Right... now what do I really want to DO, now that I have some idea of how I go about it?', or whatever. C# is surely the best language for him to actually latch onto firmly, but learning PHP first can get him there faster. Yes.


Friend of mine decided to learn the guitar when he was (much) younger. He went to his first guitar lesson and spent an hour learning how to play an open E string. He never looked at the guitar again and eventually sold it.

Years later, he got another guitar and just played along with records. Now he's rather good at it.

My point is, how many beginners really want to learn the proper way to do things? When I started out I didn't care about functions or variables or classes or arrays or strings or anything else, I just wanted to make some stuff move about on the screen. Same with the guitar - playing the same note for an hour isn't any fun, and although it might teach you the *right* way to play that note, if you don't enjoy it then everything you've learnt is useless because you'll just give up.

I was thinking about this the other day, so I'd be interested to hear what people think. If you were going to teach someone to program, would you show them how to do something simple but interesting (make a sprite move around in a Java applet, for example) and gradually explain how you've done it, or would you start them off with functions, variables, classes, etc, and gradually build towards something interesting? My thinking is that if you don't grab someone's attention right at the start they'll never get past the first few lessons.

Author:  CUS [ Wed Apr 09, 2008 21:42 ]
Post subject:  Re: Programming

I was simply suggesting that he learn what variables, functions, strings etc. are whilst seeing their results on-screen, right now, with little effort, right now guy. Then he could go onto C# with a degree of confidence. Since he's already got Turbo Pascal about, he might as well go straight onto C# after, it'd accomplish the same purpose... mostly... enough, I expect.

Quote:
When I started out I didn't care about functions or variables or classes or arrays or strings or anything else, I just wanted to make some stuff move about on the screen.

But that isn't learning how to program, which is what he asked about. *rethinks* Oh, are you suggesting he... downloads a sample game or something, and sort of fiddles with it a bit? That might work too, I support that's one way to see how you can... make shit happen. It's just completely the opposite way to how I would do it, but YOAYO *shrugs*

Author:  Plissken [ Wed Apr 09, 2008 21:54 ]
Post subject:  Re: Programming

mrbogus wrote:
I was thinking about this the other day, so I'd be interested to hear what people think. If you were going to teach someone to program, would you show them how to do something simple but interesting (make a sprite move around in a Java applet, for example) and gradually explain how you've done it, or would you start them off with functions, variables, classes, etc, and gradually build towards something interesting? My thinking is that if you don't grab someone's attention right at the start they'll never get past the first few lessons.


I'm entirely self taught in (counts on fingers) far too many languages. Mainly by taking the Nike approach and having an idea and Just Doing It.

The downside to this is that some of the terms used pass me completely by. I couldn't describe what a strongly typed array is* but I will automatically use them all the time, and tell off my PFY (fresh out of Uni with a 1st in Comp Sci) for not type declaring all his variables.

I do believe in a natural aptitude for programming, though. Mine was because of all the (borrowed -Ed.) games I used to have for my Vic-20, C64 or Amiga, where you could only work out the instructions from the reviews and tips pages as (the friend had not lent you the instructions - Ed.).

*Actually, I do. Bad example.

Edit:Forgot the footnote

Author:  WTB [ Wed Apr 09, 2008 21:56 ]
Post subject:  Re: Programming

I just programmed something in Pascal using Notepad++ and some strange free compiler. It kind of worked a bit. I managed to make an exe file and it outputs in a cmd prompt sort of thing, but it just flashes on and then closes. Somehow I managed to make it stay on and the calculation I did was out by a decimal place. Learning is fun.

Author:  Sledge [ Wed Apr 09, 2008 22:04 ]
Post subject:  Re: Programming

Quote:
If you were going to teach someone to program, would you show them how to do something simple but interesting (make a sprite move around in a Java applet, for example) and gradually explain how you've done it, or would you start them off with functions, variables, classes, etc, and gradually build towards something interesting? My thinking is that if you don't grab someone's attention right at the start they'll never get past the first few lessons.

The real question you need to answer in deciding which language to go with is how far you want to be abstracted from the compiler -- all OOP languages will abstract the problem you are trying to solve, because that's what OOP is, and you will be expressing pretty much the same *stuff* in all of them. The difference is that C-alikes will require you to have a better handle on what's really going on (like knowing what pointers are) and hold the compiler's hand for it (this is the end of the line Mr Compiler;) whereas script and BASIC derivatives won't so much. Can you get interesting things up and running in BlitzMax (might as well keep pushing my fave!) faster than C#? Sure. Does it take a long time to get things running in C# by any objective standard? Not really (see XNA). You can't really go wrong.

Author:  CUS [ Wed Apr 09, 2008 22:05 ]
Post subject:  Re: Programming

jonarob wrote:
the calculation I did was out by a decimal place. Learning is fun.

:)

Author:  Scarysheep3000 [ Wed Apr 09, 2008 22:38 ]
Post subject:  Re: Programming

I am going to copy Jonarob and buy that book, as I too am a simpleton who can't code yet who got a C in A-level Computing (by programming a simple database in BASIC).

Author:  tossrStu [ Wed Apr 09, 2008 22:57 ]
Post subject:  Re: Programming

Dimrill wrote:
Winnar! :DD to Stu, obv.


Winnar... or LOSER?

Code:
10 LET t=0
20 FOR x=32768 TO 32814
30 READ y
40 POKE x,y
50 LET t=t+y
60 NEXT x
70 IF t<>4154 THEN PRINT "Error in data" : STOP
80 RANDOMIZE USR 32768
90 DATA 17,16,128,1,31,0,205
100 DATA 60,32,62,0,211,254,60
110 DATA 24,251,32,66,65,83,73
120 DATA 67,32,105,115,32,97
130 DATA 108,115,111,32,102,111
140 DATA 114,32,115,107,105,108
150 DATA 108,109,97,115,116,101
160 DATA 114,115

Author:  Pod [ Wed Apr 09, 2008 23:36 ]
Post subject:  Re: Programming

If you want to learn java I can get you a lovely free copy (pdf, natch) of a very good textbook. It's being written by one of the lectures at our university and is a very good way of teaching things. Well, some of the examples are fucking crap and the guy likes to do things in very round a bout ways, but the fact is it sets you nice little exercises.

Why not try and and I'll mark them for you? ;) If you learn Java, it's a very small step to learn C#. And from there it's an even smaller step to learn C/C++. Personally my favourite language is ARM Assembler. Nothing like predicated instructions to get me hard.

Author:  Anonymous X [ Thu Apr 10, 2008 0:39 ]
Post subject:  Re: Programming

CUS wrote:
Anonymous X wrote:
can't even manage HTML

HTML isn't a programming language. :nerd:
It is to anyone who knows nothing about computers.

Author:  Shewolf [ Thu Apr 10, 2008 0:48 ]
Post subject:  Re: Programming

There's loads I'd love to learn, but I have a slight learning difficulty and I'm still working on simple thigns like HTML and CSS, let along moving onto programming.
Still, in future I do intend to look further in to it Image

Author:  Mr Dave [ Thu Apr 10, 2008 2:35 ]
Post subject:  Re: Programming

CUS wrote:
jonarob wrote:
I'll take it from anyone.

/me clears throat loudly.

And that's not why Grim... was clearing his, jonny boy.
Mr Dave wrote:
Hello! I don't actually see why people have any problems with it. It's lovely.

C? As a first programming language, in this exciting future we live in? It doesn't even do strings!
I rather like C++ and I even wrote the beginnings of a shitty Scramble clone in it (libSDL is lovely for cross-platform gammy stuff). As Mr. jonny's first programming language to see what it's like? 8)


*cough*
(Admittedly, I just use WCHAR arrays for everything string related, but still...)

I just prefer it as it gives you a much greater idea of what the hardware is actually doing over any other non-assembly language.
(See also: Why I quite like x86 assembly)

Author:  Crimewave [ Thu Apr 10, 2008 7:36 ]
Post subject:  Re: Programming

On the subject of Ruby, this book http://www.pragprog.com/titles/fr_ltp is by all accounts a good introduction to programming if you have absolutely no past experience. A few sample chapters online too.

I'm a freelance programmer fluent in several languages and I'd have gone for a dynamic scripting language such as Ruby as a starter for 10. Ignoring all the Rails hype, the underlying Ruby language is fantastic for getting a lot done in relatively few lines of code, and it will teach you sound object-oriented concepts applicable to many other languages.

Author:  AceAceBaby [ Thu Apr 10, 2008 9:28 ]
Post subject:  Re: Programming

I think I have to learn C-something again soon.

Right now the only programming I do (under sufferance) is in LSL, a scripting language. "They" are putting some "Mono" thing into the system so it will be all "proper" languages then. :nerd: :'(

Author:  WTB [ Thu Apr 10, 2008 9:52 ]
Post subject:  Re: Programming

Scarysheep3000 wrote:
I am going to copy Jonarob and buy that book, as I too am a simpleton who can't code yet who got a C in A-level Computing (by programming a simple database in BASIC).


Are you me?

Author:  Cras [ Thu Apr 10, 2008 10:09 ]
Post subject:  Re: Programming

I also got a C for a-level computer science. The teacher decided that my awesome Pascal (Turbo? Ooh, fancy!) written company payroll system wasn't 'appropriate' as a project. Even though he'd been saying how ace it was all year.

Author:  ElephantBanjoGnome [ Thu Apr 10, 2008 10:16 ]
Post subject:  Re: Programming

Craster wrote:
I also got a C for a-level computer science. The teacher decided that my awesome Pascal (Turbo? Ooh, fancy!) written company payroll system wasn't 'appropriate' as a project. Even though he'd been saying how ace it was all year.

Bizarre, I too got a C and also used frigging pascal. In my defense though, the lecturer for the course dissapeared after the first year, and for half of the second year we got a sub who just said 'keep, errr, doing your pascal', which basically meant all we did was piss about on the internet all lesson, every lesson. Eventually a full-time person was hired but he didn't actually have a clue about the course, and it was too late to actually teach us anything. Complete shambles, I say.

Author:  Grim... [ Thu Apr 10, 2008 10:22 ]
Post subject:  Re: Programming

I got an F, mainly because we (as in, the whole class) did the wrong coursework, and all got a 'U'. The genius teacher ever taught us LIFO and FIFO backward. He left that year when the PC replaced the Acorns.

Author:  CUS [ Thu Apr 10, 2008 10:36 ]
Post subject:  Re: Programming

:D We were joking at work yesterday about how useless most computer courses are. Lots of 'This is how the bus works' and 'This is FIFO, LILO, LIFO, FILO...'. Over and over and over and over again.

I have never needed to know the difference between a MAN and a WAN.

Author:  Grim... [ Thu Apr 10, 2008 10:38 ]
Post subject:  Re: Programming

LILO is FIFO, surely?

Author:  Mr Dave [ Thu Apr 10, 2008 10:59 ]
Post subject:  Re: Programming

At school I didn't do the computing course, it seemed a bit pointless. Before I even started doing GCSEs, I probably could have passed the A-level course.

Author:  CUS [ Thu Apr 10, 2008 11:07 ]
Post subject:  Re: Programming

Grim... wrote:
LILO is FIFO, surely?

Of course. Almost every college exam I sat had 'Which is the odd one out: LILO, FIFO, or FILO?'

Author:  Malabelm [ Thu Apr 10, 2008 11:08 ]
Post subject:  Re: Programming

IT (renamed to ITC eventually - bugger that) was all about word processing and spreadsheets. It didn't interest me, so I took Biology, Chemistry and Psychology, keeping computers as a hobby. Now I work with the things, but it isn't bad, if I'm honest.

Author:  Grim... [ Thu Apr 10, 2008 11:16 ]
Post subject:  Re: Programming

nynfortoo wrote:
IT (renamed to ITC eventually - bugger that) was all about word processing and spreadsheets.

You must be a young'un - it was called 'computing' when I was at school, and we did bugger all about WP and spreadsheets.

Author:  Malabelm [ Thu Apr 10, 2008 11:19 ]
Post subject:  Re: Programming

Grim... wrote:
nynfortoo wrote:
IT (renamed to ITC eventually - bugger that) was all about word processing and spreadsheets.

You must be a young'un - it was called 'computing' when I was at school, and we did bugger all about WP and spreadsheets.


Fairly young - 23. My IT teacher had a degree in geology, and was utterly, utterly useless with computers.

Author:  mrbogus [ Thu Apr 10, 2008 11:20 ]
Post subject:  Re: Programming

nynfortoo wrote:
IT (renamed to ITC eventually - bugger that) was all about word processing and spreadsheets.


I did GCSE IT (called "ISG" at the time) because I noticed there was a bit of programming at the end of the course. It was all about word processing and the programming was a lie. Massive waste of time.

Geology? Consider yourself lucky. My IT teacher was a former PE teacher.

Author:  Grim... [ Thu Apr 10, 2008 11:23 ]
Post subject:  Re: Programming

My IT teacher told us, and I quote: "The only thing Windows 95 does that 3.1 doesn't is to let you put shortcuts on the desktop. [Acorn] MOS has been doing that for years."

Author:  AceAceBaby [ Thu Apr 10, 2008 11:56 ]
Post subject:  Re: Programming

We had BBC B's at my school.

There was some game about building a dyke, and another one about trying to "win" the battle of the Somme better than the real generals did.

And we made circles and stuff on the screen. :nerd:

Author:  CUS [ Thu Apr 10, 2008 11:59 ]
Post subject:  Re: Programming

AceAceBaby wrote:
And we made circles and stuff on the screen. :nerd:

Apparently, that's a game called 'Elite'. I was surprised too, after the fact.

Author:  BikNorton [ Thu Apr 10, 2008 12:00 ]
Post subject:  Re: Programming

AceAceBaby wrote:
I think I have to learn C-something again soon.

Right now the only programming I do (under sufferance) is in LSL, a scripting language. "They" are putting some "Mono" thing into the system so it will be all "proper" languages then. :nerd: :'(

Mono is an open-source implementation of the .NET CLR (Common Language Runtime) that C#, J#, VB.NET and Managed C++ (or C++/CLR, or whatever it's called now) run on. Your LanguageOfChoice code is processed into CIL (Common Intermediate Language) which the CLR runs.

So! Instead of learning C, learn how to write/define/build an LSL->CIL processor so you can just port all your LSL stuff straight into the new Mono-based system!

Author:  CUS [ Thu Apr 10, 2008 12:27 ]
Post subject:  Re: Programming

PHP.

Author:  BikNorton [ Thu Apr 10, 2008 12:56 ]
Post subject:  Re: Programming

Oh yes, I did CLAIT at school (a clash prevented Computer Studies, which I ended up doing as an additional GCSE anyway).

Thou Shalt Not Give Faulty Acronyms To Schoolchildren - any foo' know you don't include minor words like 'and' and 'or' in acronyms. Now I'm a grown-up it's hard to believe that Computer Literacy and Information Technology wasn't a joke that got out of hand.

Author:  Pod [ Thu Apr 10, 2008 14:05 ]
Post subject:  Re: Programming

ComicalGnomes wrote:
Craster wrote:
I also got a C for a-level computer science. The teacher decided that my awesome Pascal (Turbo? Ooh, fancy!) written company payroll system wasn't 'appropriate' as a project. Even though he'd been saying how ace it was all year.

Bizarre, I too got a C and also used frigging pascal. In my defense though, the lecturer for the course dissapeared after the first year, and for half of the second year we got a sub who just said 'keep, errr, doing your pascal', which basically meant all we did was piss about on the internet all lesson, every lesson. Eventually a full-time person was hired but he didn't actually have a clue about the course, and it was too late to actually teach us anything. Complete shambles, I say.


I've yet to meet someone who had a GOOD teacher for their A level computer-ing. HMPH.

CUS wrote:
:D We were joking at work yesterday about how useless most computer courses are. Lots of 'This is how the bus works' and 'This is FIFO, LILO, LIFO, FILO...'. Over and over and over and over again.

I have never needed to know the difference between a MAN and a WAN.


Everything they teach you up to A-level is ridicuously simplistic and not useful in anyway shape or form. Why do these thnigs exist?

Mr Dave wrote:
At school I didn't do the computing course, it seemed a bit pointless. Before I even started doing GCSEs, I probably could have passed the A-level course.


See above!

Author:  Anonymous X [ Thu Apr 10, 2008 16:24 ]
Post subject:  Re: Programming

ComicalGnomes wrote:
Bizarre, I too got a C and also used frigging pascal. In my defense though, the lecturer for the course dissapeared after the first year, and for half of the second year we got a sub who just said 'keep, errr, doing your pascal', which basically meant all we did was piss about on the internet all lesson, every lesson. Eventually a full-time person was hired but he didn't actually have a clue about the course, and it was too late to actually teach us anything. Complete shambles, I say.
Sounds like GCSE German for my year group. We just had a few supply teachers who didn't know or speak German, they just had a pile of very old textbooks which we were meant to work through ourselves somehow. Some lessons one year we were timetabled to sit in the GCSE PE 'class room' because there was no other free rooms - it stank, and we had to put our work on our laps, although few people actually worked. The only one of 25 of us who passed the GCSE was a German lad (which may have been the only GCSE he passed).

Author:  Halo [ Fri Apr 11, 2008 11:20 ]
Post subject:  Re: Programming

The ideal learning programming language is Python or Ruby. Python probably takes it in terms of sheer all-round niceness and the amount of concepts it introduces - I can recommend Apress's Beginning Python which is pretty well written. Ruby is pretty good, but has a few less intuitive concepts, less clear syntax and its books tend to be a bit poor - the Pickaxe is horribly overrated.

PHP is pretty damn ugly and annoying but is exceptionally easy to pick up and play with. It's a language that has been thrown together rather than fitting together nicely. It's not a good language for "learning programming" but is suitable for hacking stuff together despite any experience.

C# is pretty much Java, which has upsides and downsides - it's quite fast, it's a nice compromise between speed-and-clarity, but it has long-winded syntax and forces you to use objects for everything.

Author:  AceAceBaby [ Fri Apr 11, 2008 14:35 ]
Post subject:  Re: Programming

BikNorton wrote:
So! Instead of learning C, learn how to write/define/build an LSL->CIL processor so you can just port all your LSL stuff straight into the new Mono-based system!


:nerd: I make objects move, and textures change into other textures. Don't confuse me with your programming stuff! :'(

Author:  WTB [ Fri Apr 11, 2008 19:19 ]
Post subject:  Re: Programming

The book arrived! And it really does start from the beginning - I think I'm gonna be ok.

I tried "Hello World" and it works fine. However, my console only flashes on and then closes itself instead of staying open and actually displaying my "program". Anybody know why? It's the basic cmd console.

Author:  Mr Dave [ Fri Apr 11, 2008 19:23 ]
Post subject:  Re: Programming

Because that's how windows works. If you want it to delay the end of the program, you have to ask it to.

(Also, I think there's an option in Visual studio which also has the same effect.)

Author:  WTB [ Fri Apr 11, 2008 19:24 ]
Post subject:  Re: Programming

Ah right. In the book it doesn't mention that, it just says that the cmd prompt will remain open and show my "hello world".

Author:  AceAceBaby [ Fri Apr 11, 2008 19:26 ]
Post subject:  Re: Programming

:bulb: Run it from the console.

Page 2 of 3 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/