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:  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.

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

If you're running a command line program from windows it'll close the window when it's finished. There's plenty of ways to get it to pause though. Alternatively, start a windows command line and run said program from that.

Edit : 3 answers in as many minutes, does this place rock or what?

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

I've fathomed a way. I was running it and debugging, but if I run it without debugging it keeps it open. Presumably when it debugs, it just runs the program to test it and then closes it.

edit: It does indeed rock!

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

The easy way would be to chuck in a breakpoint just before the program ends if you want it to pause with no extra work while debugging.

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

Yeah that would be easy, were it not my first ever program in C# :p

I'm just following the book!

Am I right in thinking that debug does just that? Checks the program and closes it? Whereas running it without debug is like running it from the point of view of an end user who may have downloaded my program?

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

jonarob wrote:
Yeah that would be easy, were it not my first ever program in C# :p

I'm just following the book!

Am I right in thinking that debug does just that? Checks the program and closes it? Whereas running it without debug is like running it from the point of view of an end user who may have downloaded my program?


No, the point of debug is to enable you to debug it (after all, how does it know a bug as compared to the behaviour you wanted, you may have wanted it to horribly crash). Breakpoints are places where you stop the program from running, and then it allows you to step through each instruction and see what values things are taking, hence allowing you to find wrong ones, and find the bug causing it. Just one of the things that debuggers allow you to do.

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

Right. So does anyone know why the book tells me that the console will show my "hello world" when in fact it just closes the cmd prompt? Is the book BROKEN? I've followed the instructions exactly.

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

Are you seeing Hello World at all before it closes?
Oh. So, do you have a command prompt, but running your program then closes that prompt? Even though you already had a prompt anyway before running the program?

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

I wouldn't think it's broken - certainly not in terms of teaching you to program as compared to using visual studio. Did it actually ask you to debug it as compared to just running it? Could be that VS2008 works differently from 2005. Could be the professional version works differently to the express version. As it stands the program is doing exactly what it's supposed to, it's just the enviroment around it that isn't behaving quite as you'd expect, but don't worry.

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

Basically, I've written the Hello World in Visual C# Express, I click "start debugging" like the book says, the cmd prompt flashes up for a split second with my Hello World in it and closes immediately. It is there, but it closes. However, if I click "start without debugging" the cmd prompt stays open. However, the book says to click "start debugging" and shows the cmd prompt OPEN. Bah!

I don't already have the cmd prompt open, by the way.

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

Right, time to install c# express (2008, I'm guessing) and see what's up.

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

I'm not sure anything is actually wrong. I always thought debugging something runs the program and closes it?

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

As I said, the programs fine, the enviroment isn't behaving as you expect. I'm just looking to see if there's a way to change that.

I do remember an option about whether the console closes automatically, but it's been a long time since I've done anything console based.

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

To be honest, it looks like it moves onto Windows based stuff pretty soon, so fuck it! :)

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

Bugger me, express is sparse. No option there, but I get exactly the same results as you do (that is one pauses, one doesn't), and I wouldn't worry about it.

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

Aces! Thanks, Dave :) (And CUS)

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

PHP.

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

Shh!

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

CUS wrote:
PHP.


Goddamned hippy.

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

(I have idly started to write a book called 'How to learn how to program (with PHP)'. It is written in PHP. It's actually forming together scarily well, so that even when I inevitably completely forget about it in a day or two, it might be worth posting anyway, as a 'How to write a book (with PHP' example.)

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

CUS wrote:
(I have idly started to write a book called 'How to learn how to program (with PHP)'. It is written in PHP. It's actually forming together scarily well, so that even when I inevitably completely forget about it in a day or two, it might be worth posting anyway, as a 'How to write a book (with PHP' example.)


How does it bind the pages? With $string?


I AM THE FUNNIEST PERSON EVER.

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

Craster wrote:
CUS wrote:
PHP.


Goddamned hippy.


I'm meeting you half-way you stupid hippies.

Image

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

jonarob wrote:
I'm meeting you half-way you stupid hippies.

Image

"Make it £1 a month!"

Author:  Grim... [ Fri Apr 11, 2008 22:30 ]
Post subject:  Re: Programming

Haaaaaaa-rooooooooo!

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

I can do a mean Nixon impression, me.

Author:  CUS [ Sat Apr 12, 2008 0:01 ]
Post subject:  Re: Programming

You order the deaths of civilian north Koreans in unlawful air strikes? FUCKING HELL JONAROB!!! :o

Author:  WTB [ Sat Apr 12, 2008 0:03 ]
Post subject:  Re: Programming

Only playing, though.

Author:  CUS [ Sat Apr 12, 2008 0:10 ]
Post subject:  Re: Programming

Oh if you're only playing that's okay.

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