Topic: Good programming language to learn?

Offline Kayne

  • Addicted
  • Kayne is awe-inspiring!Kayne is awe-inspiring!Kayne is awe-inspiring!Kayne is awe-inspiring!Kayne is awe-inspiring!Kayne is awe-inspiring!Kayne is awe-inspiring!Kayne is awe-inspiring!Kayne is awe-inspiring!Kayne is awe-inspiring!Kayne is awe-inspiring!Kayne is awe-inspiring!
  • Posts: 3,298
Maybe say the idea anyway? Chess might be a bit too hard for me :O

OH, and you guys like to have source files eh...

Any tips, is appreciated, and usually followed by rep :D

GJ Pyro :>

Reply #225 Posted: November 30, 2010, 01:24:00 pm
Quote
Top Geary - 27th May 2016 at 12:10 AM
I've learnt to ignore when you say derogatory things to me

Offline Pyromanik

  • Hero Member
  • Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!
  • Posts: 28,834
Ok.

I was going to give you a day or so's grace.



Pyro's Challenge #2:
Take that game you just made (O&X's), and extend it to work on any sized board.
(Obviously superlarge boards will be just supid, but say if you can play anywhere between 3 and 10 length sides...)
This challenge teaches code cleanliness, extensibility and ease of maintenance.

Reply #226 Posted: November 30, 2010, 01:26:57 pm
Everyone needs more Bruce Campbell.

Offline Bell

  • Addicted
  • Bell is on the verge of being accepted.Bell is on the verge of being accepted.Bell is on the verge of being accepted.Bell is on the verge of being accepted.Bell is on the verge of being accepted.
  • Posts: 4,263
ahh a classic extend the program task, he will be ready to take on uni problems in no time :p

Reply #227 Posted: November 30, 2010, 01:28:54 pm

Offline Pyromanik

  • Hero Member
  • Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!
  • Posts: 28,834
Indeed :>

The cleaner the code, the better you are!
Plus 2D noughts and crosses isn't a hard task. He's done all the game logic...
If he's done it neatly, he'll just have to change a few numbers!

Reply #228 Posted: November 30, 2010, 01:29:53 pm
Everyone needs more Bruce Campbell.

Offline Kayne

  • Addicted
  • Kayne is awe-inspiring!Kayne is awe-inspiring!Kayne is awe-inspiring!Kayne is awe-inspiring!Kayne is awe-inspiring!Kayne is awe-inspiring!Kayne is awe-inspiring!Kayne is awe-inspiring!Kayne is awe-inspiring!Kayne is awe-inspiring!Kayne is awe-inspiring!Kayne is awe-inspiring!
  • Posts: 3,298
Wahhh...?

Reply #229 Posted: November 30, 2010, 01:30:09 pm
Quote
Top Geary - 27th May 2016 at 12:10 AM
I've learnt to ignore when you say derogatory things to me

Offline Pyromanik

  • Hero Member
  • Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!
  • Posts: 28,834
Make your naughts and crosses work on a board of a supplied size (eg 5x5), using the same code you've already written as a base. :>
The board will always be square, so you don't need to worry about accepting 2 numbers, just one.



As a side note... I got an assignment in my second year to implement chess. I never finished it.
I failed that course through my own inaction. Now might be the time to rectify that! :>

Reply #230 Posted: November 30, 2010, 01:31:21 pm
Everyone needs more Bruce Campbell.

Offline Kayne

  • Addicted
  • Kayne is awe-inspiring!Kayne is awe-inspiring!Kayne is awe-inspiring!Kayne is awe-inspiring!Kayne is awe-inspiring!Kayne is awe-inspiring!Kayne is awe-inspiring!Kayne is awe-inspiring!Kayne is awe-inspiring!Kayne is awe-inspiring!Kayne is awe-inspiring!Kayne is awe-inspiring!
  • Posts: 3,298
ahh, that's going to be a bit hard.

My code is very messy, as well as specific. Any other projects / ideas that I could try?

Reply #231 Posted: November 30, 2010, 01:52:04 pm
Quote
Top Geary - 27th May 2016 at 12:10 AM
I've learnt to ignore when you say derogatory things to me

Offline Apostrophe Spacemonkey

  • Fuck this title in particular.

  • Apostrophe Spacemonkey is awe-inspiring!Apostrophe Spacemonkey is awe-inspiring!Apostrophe Spacemonkey is awe-inspiring!Apostrophe Spacemonkey is awe-inspiring!Apostrophe Spacemonkey is awe-inspiring!Apostrophe Spacemonkey is awe-inspiring!Apostrophe Spacemonkey is awe-inspiring!Apostrophe Spacemonkey is awe-inspiring!Apostrophe Spacemonkey is awe-inspiring!Apostrophe Spacemonkey is awe-inspiring!Apostrophe Spacemonkey is awe-inspiring!Apostrophe Spacemonkey is awe-inspiring!
  • Posts: 19,050
Quote from: `Kayne;1336885
btw again, Spacemonkey, it seems that if a chess piece kills more than 3 people, then it will blood3 will be dropped when it kills more?

It just picks it randomly.

I updated it to include notation.

Reply #232 Posted: November 30, 2010, 02:43:59 pm

Offline Pyromanik

  • Hero Member
  • Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!
  • Posts: 28,834
Quote from: `Kayne;1336902
ahh, that's going to be a bit hard.

My code is very messy, as well as specific.

That's the point ;D

Reply #233 Posted: November 30, 2010, 03:10:26 pm
Everyone needs more Bruce Campbell.

Offline Tiwaking!

  • Hero Member
  • Tiwaking! is awe-inspiring!Tiwaking! is awe-inspiring!Tiwaking! is awe-inspiring!Tiwaking! is awe-inspiring!Tiwaking! is awe-inspiring!Tiwaking! is awe-inspiring!Tiwaking! is awe-inspiring!Tiwaking! is awe-inspiring!Tiwaking! is awe-inspiring!Tiwaking! is awe-inspiring!Tiwaking! is awe-inspiring!Tiwaking! is awe-inspiring!
  • Posts: 12,583
Quote from: Spacemonkey;1336826
http://i3.photobucket.com/albums/y67/jarik/chess.png
Good programming language to learn?

This might be more appropriate for the board:

Reply #234 Posted: November 30, 2010, 03:13:04 pm
I am now banned from GetSome

Offline Pyromanik

  • Hero Member
  • Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!
  • Posts: 28,834
Tiwa can only move diagonally.

Reply #235 Posted: November 30, 2010, 07:16:26 pm
Everyone needs more Bruce Campbell.

Offline Pyromanik

  • Hero Member
  • Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!
  • Posts: 28,834
Quote from: Pyromanik;1336927
Quote from: `Kayne;1336902
ahh, that's going to be a bit hard.

My code is very messy, as well as specific.

That's the point ;D


I'll help you out. It'll be great. You'll learn heaps, and your next program will be easier to achieve! :)

For a start:
Dear Kayne, please write more functions.

Reply #236 Posted: November 30, 2010, 08:50:50 pm
Everyone needs more Bruce Campbell.

Offline Virus.

  • Devoted Member
  • Virus. has no influence.
  • Posts: 1,817
I like how Kayne's the pawn.

I'm not a short-lived fanatic. I have an exam, hense have done nothing and berely read the forums.

Reply #237 Posted: November 30, 2010, 09:00:49 pm

Offline Pyromanik

  • Hero Member
  • Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!
  • Posts: 28,834
mmkay. Steam history says otherwise.

Reply #238 Posted: November 30, 2010, 10:06:59 pm
Everyone needs more Bruce Campbell.

Offline Kayne

  • Addicted
  • Kayne is awe-inspiring!Kayne is awe-inspiring!Kayne is awe-inspiring!Kayne is awe-inspiring!Kayne is awe-inspiring!Kayne is awe-inspiring!Kayne is awe-inspiring!Kayne is awe-inspiring!Kayne is awe-inspiring!Kayne is awe-inspiring!Kayne is awe-inspiring!Kayne is awe-inspiring!
  • Posts: 3,298
Quote from: Pyromanik;1337054
I'll help you out. It'll be great. You'll learn heaps, and your next program will be easier to achieve! :)

For a start:
Dear Kayne, please write more functions.

Sounds good :)

If a function is a method, The only reason I didn't use them is because no matter how much I fiddled around with the code, there would always be a syntax errors. That was with the method itself, not when ever I tried to use it (because I never got to use it lol :()

Reply #239 Posted: November 30, 2010, 11:07:02 pm
Quote
Top Geary - 27th May 2016 at 12:10 AM
I've learnt to ignore when you say derogatory things to me

Offline toofast

  • Addicted
  • toofast barely matters.toofast barely matters.
  • Posts: 3,697
A method needs to be outside the main function, but inside the class declaration.

So like
Code: [Select]
namespace WindowsFormsApplication1
{
  static class Program
  {

    /// <summary>
    /// The main entry point for the application.
    /// </summary>
    [STAThread]
    static void Main()
    {
      Application.EnableVisualStyles();
      Application.SetCompatibleTextRenderingDefault(false);
      Application.Run(new Form1());
    }

    public void method1(int input1, string input2)
    {
      //Do crap
    }
  }
}


Heres a good starting method. Given i have a board of n by n, i want to check if the spot is taken. So i would want a function which takes the position of the spot, and return a bool or int of 1/0 (true/false).

Then make another method, which will be similar to the above, except it places the cross on that spot, and returns nothing (so is of type void).

Reply #240 Posted: December 01, 2010, 12:09:59 am

Offline Pyromanik

  • Hero Member
  • Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!
  • Posts: 28,834
mmm yeah. A function cannot be inside another function.
Unless you're batshit crazy like javascript.

Reply #241 Posted: December 01, 2010, 10:26:38 am
Everyone needs more Bruce Campbell.

Offline Bell

  • Addicted
  • Bell is on the verge of being accepted.Bell is on the verge of being accepted.Bell is on the verge of being accepted.Bell is on the verge of being accepted.Bell is on the verge of being accepted.
  • Posts: 4,263
or lua

Reply #242 Posted: December 01, 2010, 12:34:39 pm

Offline Apostrophe Spacemonkey

  • Fuck this title in particular.

  • Apostrophe Spacemonkey is awe-inspiring!Apostrophe Spacemonkey is awe-inspiring!Apostrophe Spacemonkey is awe-inspiring!Apostrophe Spacemonkey is awe-inspiring!Apostrophe Spacemonkey is awe-inspiring!Apostrophe Spacemonkey is awe-inspiring!Apostrophe Spacemonkey is awe-inspiring!Apostrophe Spacemonkey is awe-inspiring!Apostrophe Spacemonkey is awe-inspiring!Apostrophe Spacemonkey is awe-inspiring!Apostrophe Spacemonkey is awe-inspiring!Apostrophe Spacemonkey is awe-inspiring!
  • Posts: 19,050
Kayne, you should learn LOLCODE

Code: [Select]
HAI
CAN HAS STDIO?
VISIBLE "HAI WORLD!"
KTHXBYE

or Brainfuck

Code: [Select]
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++
..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.

or INTERCAL

Code: [Select]
DO ,1 <- #13
PLEASE DO ,1 SUB #1 <- #238
DO ,1 SUB #2 <- #108
DO ,1 SUB #3 <- #112
DO ,1 SUB #4 <- #0
DO ,1 SUB #5 <- #64
DO ,1 SUB #6 <- #194
DO ,1 SUB #7 <- #48
PLEASE DO ,1 SUB #8 <- #22
DO ,1 SUB #9 <- #248
DO ,1 SUB #10 <- #168
DO ,1 SUB #11 <- #24
DO ,1 SUB #12 <- #16
DO ,1 SUB #13 <- #162
PLEASE READ OUT ,1
PLEASE GIVE UP



Reply #243 Posted: December 01, 2010, 02:25:00 pm

Offline AintNoMeInTeam

  • Devoted Member
  • AintNoMeInTeam has no influence.
  • Posts: 1,792
Quote from: Pyromanik;1337198
mmm yeah. A function cannot be inside another function.
Unless you're batshit crazy like javascript.

or you use lambda expressions/statements in c#

Reply #244 Posted: December 01, 2010, 07:59:14 pm
Quote
Nobody will ever win the battle of the sexes...there\'s too much fraternizing with the enemy.
-Henry Kissinger

Offline Speakman

  • Hero Member
  • Speakman is awe-inspiring!Speakman is awe-inspiring!Speakman is awe-inspiring!Speakman is awe-inspiring!Speakman is awe-inspiring!Speakman is awe-inspiring!Speakman is awe-inspiring!Speakman is awe-inspiring!Speakman is awe-inspiring!Speakman is awe-inspiring!Speakman is awe-inspiring!Speakman is awe-inspiring!
  • Posts: 12,562
lolcode ftw

Reply #245 Posted: December 01, 2010, 09:18:26 pm
Quote from: Mellcor
i had kinda hope speakman had died, what a pity

Offline Pyromanik

  • Hero Member
  • Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!Pyromanik is awe-inspiring!
  • Posts: 28,834
Quote from: AintNoMeInTeam;1337395
Quote from: Pyromanik;1337198
mmm yeah. A function cannot be inside another function.
Unless you're batshit crazy like javascript.

or you use lambda expressions/statements in c#

Or Python.
But no thanks.
Anyway, not true functions.

Reply #246 Posted: December 01, 2010, 11:31:55 pm
Everyone needs more Bruce Campbell.

Offline AintNoMeInTeam

  • Devoted Member
  • AintNoMeInTeam has no influence.
  • Posts: 1,792
Quote from: Pyromanik;1337439
not true functions.

yes they are, you need to check your definition of a function.

and they are crazy useful - just look at LINQ.

Reply #247 Posted: December 02, 2010, 12:15:43 am
Quote
Nobody will ever win the battle of the sexes...there\'s too much fraternizing with the enemy.
-Henry Kissinger

Offline Apostrophe Spacemonkey

  • Fuck this title in particular.

  • Apostrophe Spacemonkey is awe-inspiring!Apostrophe Spacemonkey is awe-inspiring!Apostrophe Spacemonkey is awe-inspiring!Apostrophe Spacemonkey is awe-inspiring!Apostrophe Spacemonkey is awe-inspiring!Apostrophe Spacemonkey is awe-inspiring!Apostrophe Spacemonkey is awe-inspiring!Apostrophe Spacemonkey is awe-inspiring!Apostrophe Spacemonkey is awe-inspiring!Apostrophe Spacemonkey is awe-inspiring!Apostrophe Spacemonkey is awe-inspiring!Apostrophe Spacemonkey is awe-inspiring!
  • Posts: 19,050
Lambda expressions are great. Linq is orsome, I use it all the time now, so useful.

Reply #248 Posted: December 02, 2010, 07:27:14 am

Offline Tiwaking!

  • Hero Member
  • Tiwaking! is awe-inspiring!Tiwaking! is awe-inspiring!Tiwaking! is awe-inspiring!Tiwaking! is awe-inspiring!Tiwaking! is awe-inspiring!Tiwaking! is awe-inspiring!Tiwaking! is awe-inspiring!Tiwaking! is awe-inspiring!Tiwaking! is awe-inspiring!Tiwaking! is awe-inspiring!Tiwaking! is awe-inspiring!Tiwaking! is awe-inspiring!
  • Posts: 12,583
Quote from: Spacemonkey;1337465
Lambda expressions are great. Linq is orsome, I use it all the time now, so useful.
[End of diatribe. We now return you to your regularly scheduled
programming...]
       -- Larry Wall in Configure from the perl distribution

Reply #249 Posted: December 02, 2010, 08:30:23 am
I am now banned from GetSome