You are not logged in.

#1 2005-12-31 20:06:20

Komodo
Member
From: Oxford, UK
Registered: 2005-11-03
Posts: 674

Best app to try and code with a newly-learned language?

I've got loads and loads of great ideas for things to program, but I was wondering if there's one particular app that any of you always write when you've learned a new language... an app that uses lots of different data structures, can include lamda functions etc. so that it tests all areas of a language.

Or do you all think up a new, random project to do, and just go for that?

I'm thinking of getting familiar with ncurses, so I can initially write a few CLI apps. I prefer working from the command line anyway, so this'd be cool, plus it'd mean I could delay learning whatever gui libraries are recommended for that particular language...

I'm learning python atm. I know java, oberon, haskell and a fair bit of OCAML, but those last 4 were all done as part of my course, so I was forced to learn them. Learning a language in your free time presents a different problem altogether - that of keeping your attention focused while learning the syntax (= dull dull dull) before writing the next unix-based OS (= fun fun fun).

So what are some examples of the first more-than-10-lines-long program you've written in a language when you've only just learned the syntax?


.oO Komodo Dave Oo.

Offline

#2 2005-12-31 20:28:34

xerxes2
Member
From: Malmoe, Sweden
Registered: 2004-04-23
Posts: 1,249
Website

Re: Best app to try and code with a newly-learned language?

my first python-program was a word-tester in around 150 lines. that was just cli but if you want a curses frontend you would just add it on top of it. anvway, just practice programming sucks a** so you better join a project or start your own instead. smile


arch + gentoo + initng + python = enlisy

Offline

#3 2005-12-31 20:37:59

Komodo
Member
From: Oxford, UK
Registered: 2005-11-03
Posts: 674

Re: Best app to try and code with a newly-learned language?

Heh, funny you should post xerxes2; the main reason I started python is cos I wanna contribute to magnum big_smile


.oO Komodo Dave Oo.

Offline

#4 2005-12-31 21:14:53

xerxes2
Member
From: Malmoe, Sweden
Registered: 2004-04-23
Posts: 1,249
Website

Re: Best app to try and code with a newly-learned language?

well, you seems like a nice and wise guy so if you wanna join magnum just sign up on gna and i'll add you to the dev list. i'm myself coding 100% in magnum now and consider it almost done for my personal needs but other people have new ideas and that is fine with me. dusty wants to make it totally modular but that is a little outside my time/interest/knowledge atm. big_smile


arch + gentoo + initng + python = enlisy

Offline

#5 2005-12-31 21:25:04

dust
Member
Registered: 2005-06-04
Posts: 152
Website

Re: Best app to try and code with a newly-learned language?

I've been trying to find something to work on using Rbuy since I've finsihed reading a few tutorials. Somethign small enough that I'll actually finish it, but big enough that I'll feel accomplished. xerxes2, mind if I dig into the code for your magnum and enlift projects? They seem perfect for me to learn general programming + network programming.


Writing stories for a machine.

Offline

#6 2005-12-31 21:30:30

Komodo
Member
From: Oxford, UK
Registered: 2005-11-03
Posts: 674

Re: Best app to try and code with a newly-learned language?

It's generous of you to offer me a place so quickly xerxes2; I've sent you an inclusion request on gna.org.

Hope to hear from you soon wink


.oO Komodo Dave Oo.

Offline

#7 2005-12-31 22:00:08

xerxes2
Member
From: Malmoe, Sweden
Registered: 2004-04-23
Posts: 1,249
Website

Re: Best app to try and code with a newly-learned language?

dust: of course you may look at the code as much as you like. that's why it's oss. big_smile

komodo: ok, welcome aboard. now you must register a ssh-rsa public key before you get commiting access to the source. it's just to rtfm for more info. big_smile


arch + gentoo + initng + python = enlisy

Offline

#8 2005-12-31 22:07:05

dust
Member
Registered: 2005-06-04
Posts: 152
Website

Re: Best app to try and code with a newly-learned language?

Thanks xerxes2 smile . I know its oss, but I still feel odd hackign someone's source without letting them know I'm poking around. Especially for personal projects like yours.


Writing stories for a machine.

Offline

#9 2005-12-31 22:24:31

Komodo
Member
From: Oxford, UK
Registered: 2005-11-03
Posts: 674

Re: Best app to try and code with a newly-learned language?

xerxes2 wrote:

now you must register a ssh-rsa public key before you get commiting access to the source. it's just to rtfm for more info. big_smile

Done wink


.oO Komodo Dave Oo.

Offline

#10 2006-01-01 05:46:50

deficite
Member
From: Augusta, GA
Registered: 2005-06-02
Posts: 693

Re: Best app to try and code with a newly-learned language?

When I started learning C the first thing I made was a tile engine. I think that's what it was, it was quite a while back. When I learned python I made a cheesy pong game. It only took me an hour or two including reading PyGame's documentation. It was abstract enough that I could've got it to play network in less than a half hour's time. Sorry, didn't mean to ramble.

I always like to make games with new languages. They have many of the skills you need to master and teach you how to optimize your code.

Offline

#11 2006-01-01 10:07:24

Komodo
Member
From: Oxford, UK
Registered: 2005-11-03
Posts: 674

Re: Best app to try and code with a newly-learned language?

That's a pretty good idea too deficite...

I've never done any AI programming whatsoever, yet it's something I'm VERY interested in - so much so that I'd like to program an AI-lifeform game in the future.

But at the moment, I'd find it a struggle to do AI for the enemy's pong-paddle movements; and working out how to have different difficulty levels for the AI would be hard too (all I'd do for this is increase the % of shots the AI returns, I guess...).


.oO Komodo Dave Oo.

Offline

#12 2006-01-02 05:27:44

deficite
Member
From: Augusta, GA
Registered: 2005-06-02
Posts: 693

Re: Best app to try and code with a newly-learned language?

I never did figure that out, I just had the computer player infallible tongue. It would move with the ball. I lost interest in it and never did implement true AI.

I've also wanted to do an AI simulation. Reading about and watching the trailers on TES: Oblivion's Radiant AI system inspired me. I have a similar system designed for a demo or two, I've just not gotten around to working on it.

Try thinking on terms of what the language can do as well. Instead of just coding in a style you are familiar with from other languages, read up on all the alternative methods that language provides. This way you can use it as a practical tool for its unique niche instead of just learning it to learn it. For example, python's classes are 1000 times better than C++'s IMHO, so in that pong game I made use of some heavy OOP. Also the various datastructures (lists and dictionaries being my favorites) are VERY powerful, so I made good use of those. I could've easily coded it in a C/C++ fasion, but then I would not have the appreciation for python that I do now. I know when to use it and when to use C++ and what tradeoffs each provide.

Good luck with whatever you decide to code!

Offline

#13 2006-01-02 08:26:01

Komodo
Member
From: Oxford, UK
Registered: 2005-11-03
Posts: 674

Re: Best app to try and code with a newly-learned language?

Point well made deficite... I'll try and take advantage of those nuances specific to python.


.oO Komodo Dave Oo.

Offline

#14 2006-01-03 05:09:08

dust
Member
Registered: 2005-06-04
Posts: 152
Website

Re: Best app to try and code with a newly-learned language?

Aye, very good point deficite. As an example, I've become unhealthily attached to Ruby's code blocks. Bastardized versions or Lisp's code blocks. For..each loops now seem so cludgey to me now. I especially like using blocks for setting up gtk buttons.

So when looking back into an old damage per second parser I made for eq2 using pything, I rewrote it in ruby, but looking at it it looked just like python. Went back to rereading chapters on code blocks and built in Ruby methods, now it looks completely different (ntm about 30% few lines of code).


Writing stories for a machine.

Offline

Board footer

Powered by FluxBB