How did you learn coding?


If it doesn't fit anywhere else, it belongs here. Also, come here if you just need to get hammered.

Snake Sneak

Posts: 122

Joined: Sunday, 8th January 2012, 19:11

Post Monday, 17th June 2013, 10:12

How did you learn coding?

I am extremely curious whether all who do work on crawl are program language students!
User avatar

Dungeon Master

Posts: 762

Joined: Thursday, 25th April 2013, 02:43

Post Monday, 17th June 2013, 10:45

Re: How did you learn coding?

I highly doubt that all the people who work on crawl were programming majors in college. Programing is used by plenty of other fields, and there are plenty of people who just contribute vaults and artwork (dpeg is a dev who made it on just his vaults and design knowledge). I wouldn't say I've learned to program so much as I am learning to program, but I've been using free tutorials like this one and this one.
On IRC my nick is reaverb. I play online under the name reaver, though.

Dungeon Master

Posts: 1531

Joined: Saturday, 5th March 2011, 06:29

Post Monday, 17th June 2013, 13:56

Re: How did you learn coding?

I'm entirely self-taught. I started learning from ZX Spectrum magazines when I was 7 (back then most computer magazines regularly featured simple programs you could type in and run). By the time I was taking computer science at school I knew things the teachers didn't. I have no formal qualifications. This is surprisingly normal within the industry, in my experience at least, and I've even spoken to recruiters who expressly stated they'd take a self-taught programmer with demonstrable experience over a recently graduated one any day. It's a field where literally all the information you could possibly need is freely available on the internet.

I've learnt C++ largely from Crawl's code. Some might find this hilarious, and I've even previously explicitly recommended people not to do this. But if you're familiar with spotting bad patterns then it's easy to learn filter out the good code and at least from the bad learn what not to do ;)

Dungeon Master

Posts: 3618

Joined: Thursday, 23rd December 2010, 12:43

Post Monday, 17th June 2013, 16:10

Re: How did you learn coding?

reaver wrote:I highly doubt that all the people who work on crawl were programming majors in college.

Rightly so!
reaver wrote:...there are plenty of people who just contribute vaults and artwork (dpeg is a dev who made it on just his vaults and design knowledge).

This is true although I am not code-illiterate. A bit similar to what mumra writes, I started with Basic on a Commodore+4 at the age of nine, then did assembler for 7501 and 80286, and also Pascal at school. I regret having learned Pascal instead of C++ (that was the poor decision of a teacher). When I took up math studies, I completely abandoned my coding hobby. These days, I do a bit of Perl or Latex scripts, if really needed.
But the real reason that I cannot code for Crawl is that I am unable to find my way through the huge source -- I am able to understand code snippets. However, I am convinced that my contributions to Crawl would be even worse if I had tried to provide code.
Hey, and "design knowledge": that's completely self-taught, too. Not sure if you can learn this from books -- can you?

Spider Stomper

Posts: 211

Joined: Thursday, 5th January 2012, 08:32

Post Monday, 17th June 2013, 16:19

Re: How did you learn coding?

I think that there is a critical mass of knowledge that you have to have before you really start being able to get anywhere. Some people get this from formal classes, some are self-taught. It's just like learning any other language - you have to understand the basic rules of what you're speaking, after that you can pick up vocabulary and grammatical tricks along the way.

In other languages, I've found that having a good IDE can accelerate that learning process. In Java, for example, I really like both Eclipse and Netbeans, and they've both greatly contributed to developing my skills in that language. Back when I was learning C I tried a few IDEs and.. kind of hated them. This may be because I wasn't yet in possession of that critical bolus of knowledge so I could interpret the information being presented to me, or just because I didn't try the right IDE.

Snake Sneak

Posts: 122

Joined: Sunday, 8th January 2012, 19:11

Post Monday, 17th June 2013, 18:19

Re: How did you learn coding?

Thanks for the replies guys!Btw what do you think of coding a rogue-like in machine code?that would be the epidome of coolness!(just a random thought)
User avatar

Pandemonium Purger

Posts: 1341

Joined: Monday, 24th October 2011, 06:13

Post Monday, 17th June 2013, 18:23

Re: How did you learn coding?

gorbeh wrote:Thanks for the replies guys!Btw what do you think of coding a rogue-like in machine code?that would be the epidome of coolness!(just a random thought)


what if you could code crawl in pasta sauce! :mrgreen:
seattle washington. friends for life. mods hate on me and devs ignore my posts. creater of exoelfs and dc:pt

Spider Stomper

Posts: 211

Joined: Thursday, 5th January 2012, 08:32

Post Monday, 17th June 2013, 22:31

Re: How did you learn coding?

gorbeh wrote:Thanks for the replies guys!Btw what do you think of coding a rogue-like in machine code?that would be the epidome of coolness!(just a random thought)


"cool" as in "look I drew this picture using my elbows, isn't that cool?"

If I were going to code a roguelike from scratch today, I'd probably use python. Using lower-level languages is fine if you specifically need to (or if you're already priced in to it, as with crawl) but if you don't, what's "cool" in my mind is making a good program.

Dungeon Master

Posts: 3618

Joined: Thursday, 23rd December 2010, 12:43

Post Monday, 17th June 2013, 22:43

Re: How did you learn coding?

Each of roguelike games and assembler language has virtues -- it's just that these seem to lie on opposite ends of the spectrum. Starting a roguelike in assembler is a good way to make sure you will have a hard time, and that nobody will want to pick it up :)
User avatar

Slime Squisher

Posts: 382

Joined: Thursday, 12th April 2012, 02:07

Location: Standing right behind you...

Post Tuesday, 18th June 2013, 00:21

Re: How did you learn coding?

I started with Visual Basic. :?

I now use C++ and Perl, and I'm never going back.
Jabberwocky wrote:You came back on the forums. Everything in the corner has been worse since 11/4/12. It got better when you left, but now it's bad again.


"You cannot grasp the true form of Giygas's attack!"

Snake Sneak

Posts: 122

Joined: Sunday, 8th January 2012, 19:11

Post Tuesday, 18th June 2013, 00:46

Re: How did you learn coding?

"cool" as in "look I drew this picture using my elbows, isn't that cool?"


Wow,that was a nice piece of wisdom(no sarcasm).I think I am going to use it in many aspects in times to come,thanks!

Vestibule Violator

Posts: 1500

Joined: Monday, 3rd January 2011, 17:47

Post Tuesday, 18th June 2013, 18:05

Re: How did you learn coding?

yogaFLAME wrote:
gorbeh wrote:Thanks for the replies guys!Btw what do you think of coding a rogue-like in machine code?that would be the epidome of coolness!(just a random thought)


"cool" as in "look I drew this picture using my elbows, isn't that cool?"

If I were going to code a roguelike from scratch today, I'd probably use python. Using lower-level languages is fine if you specifically need to (or if you're already priced in to it, as with crawl) but if you don't, what's "cool" in my mind is making a good program.

If I had to start from scratch today it would definitely be python. But it's also possible that I'd look at using something like the te4 engine too.

Snake Sneak

Posts: 122

Joined: Sunday, 8th January 2012, 19:11

Post Tuesday, 18th June 2013, 19:20

Re: How did you learn coding?

why phytoon?i think that vb.net and phytoon and other programming languages which need something on a pc installed beforehand are not universal enough.I mean,not every computer has it,but pretty much every computer has the files necessery for c++ applications,or did i understand something terribly wrong?
User avatar

Dungeon Master

Posts: 762

Joined: Thursday, 25th April 2013, 02:43

Post Tuesday, 18th June 2013, 19:34

Re: How did you learn coding?

gorbeh wrote:why phytoon?i think that vb.net and phytoon and other programming languages which need something on a pc installed beforehand are not universal enough.I mean,not every computer has it,but pretty much every computer has the files necessery for c++ applications,or did i understand something terribly wrong?
It's possible turn Python files to executables. That one only works for Windows, but other tools exist.

I'm also a bit curious why Python is the language of choice for roguelikes. Could somebody explain? I know it's Object Oriented and is built for legibility, but what else makes it good for this specific task?
On IRC my nick is reaverb. I play online under the name reaver, though.

Vestibule Violator

Posts: 1500

Joined: Monday, 3rd January 2011, 17:47

Post Tuesday, 18th June 2013, 19:37

Re: How did you learn coding?

gorbeh wrote:why phytoon?i think that vb.net and phytoon and other programming languages which need something on a pc installed beforehand are not universal enough.I mean,not every computer has it,but pretty much every computer has the files necessery for c++ applications,or did i understand something terribly wrong?

You sort of understood everything terribly wrong. I apologize to any real programmers out there for my 10,000 foot view

To code in C++ or any other compiled language, you write your source code, link your objects and then compile your code and distribute it. The upsides are that yes, you don't need to provide a runtime and your code is faster since the compiler is able to spend more time beforehand making everything fast. The downsides are that C++ is not that easy to learn, either you go full templated and boostified code or you end up with sort of kludgy classes. You also need to compile to test out every single change.

With python or ruby or perl or any other interpreted language, you do lose speed (although this can be counteracted to some extent by writing the parts that really matter in C and then linking to it) but you gain the ability to easily test and change code on the fly. All the aforementioned all have dynamic typing which makes things a little easier too, especially since you don't need to pass around void* to every function.

It's also generally easier to do metaprogramming in dynamic languages since the same language concepts are used to modify code as are used to write code.

Finally the need to provide to executable that can be run has been available in Python at least for quite a while. Check out http://www.py2exe.org/ to package up your source into a binary.

Dungeon Master

Posts: 1531

Joined: Saturday, 5th March 2011, 06:29

Post Tuesday, 18th June 2013, 20:32

Re: How did you learn coding?

If you want easy cross-platform I advise Javascript. It's already used in huge numbers of web and phone games, and a HTML/Javascript app can be packaged as a desktop app very easily for most platforms if you really needed to.

Spider Stomper

Posts: 211

Joined: Thursday, 5th January 2012, 08:32

Post Tuesday, 18th June 2013, 21:33

Re: How did you learn coding?

reaver wrote:I'm also a bit curious why Python is the language of choice for roguelikes. Could somebody explain? I know it's Object Oriented and is built for legibility, but what else makes it good for this specific task?


The stuff that rebthor said, yeah.

On the downside, I'm actually not the biggest fan of dynamic typing - I do prefer static typing like Java's where I know at compile-time that everything is going to jive. Coercing data types can have some goofy side effects that you really need to be on top of. It makes some things simpler, but it also makes some coders lazier. I could take it or leave it.

But you just can't beat interpreted languages for speed of development. You can prototype individual functions in real-time using the python CLI, then just drop them into your program when they're working how you want. Python also has its readability thing, which speeds up collaboration and bug fixing. Speed speed speed. Development speed is the #1 most important thing if you ever want your program to be anything more than a sweet idea that you had one day.

Also, accessibility is a huge thing. If you've got a fresh-eyed kid who just wants to learn how to contribute to his favorite game, I'd much rather put some python in front of him than some C++.
User avatar

Slime Squisher

Posts: 382

Joined: Thursday, 12th April 2012, 02:07

Location: Standing right behind you...

Post Wednesday, 19th June 2013, 01:05

Re: How did you learn coding?

mumra wrote:If you want easy cross-platform I advise HTML.

ftfy
Jabberwocky wrote:You came back on the forums. Everything in the corner has been worse since 11/4/12. It got better when you left, but now it's bad again.


"You cannot grasp the true form of Giygas's attack!"
User avatar

Tartarus Sorceror

Posts: 1850

Joined: Monday, 20th December 2010, 04:22

Location: Surabaya, Indonesia

Post Wednesday, 19th June 2013, 06:30

Re: How did you learn coding?

giygas wrote:
mumra wrote:If you want easy cross-platform I advise HTML.

ftfy

It's not a programming language, duh.
User avatar

Zot Zealot

Posts: 1060

Joined: Tuesday, 21st December 2010, 17:22

Location: United Kingdom

Post Wednesday, 19th June 2013, 10:40

Re: How did you learn coding?

mumra wrote:I'm entirely self-taught. I started learning from ZX Spectrum magazines when I was 7 (back then most computer magazines regularly featured simple programs you could type in and run). By the time I was taking computer science at school I knew things the teachers didn't.


+1 (not a Crawl developer, I have been employed as various kinds of developer for nearly 20 years though). This almost precisely mirrors my experience, though I don't think I started until I was 8 :P

I have a degree not strictly in Computer Science, though I took a lot of programming classes and ended up with enough for a major, for the easy marks.

As for the Python thing, I dunno... it's a good language, productive (you can do a lot with relatively little code) and deliberately readable. You can get something up and working quickly, and iterate from there. It has mindshare with a slightly different but overlapping group with Ruby. It also has at least one popular precanned game-writing framework. I can see a lot of people who haven't written a game before, using it to write their first one.

One of the things I have noticed about Roguelikes is the opportunity for portability - simple interfaces are easy to get running on lots of different platforms, and people want everyone to at least try their game. Starting out in machine code immediately defeats that aim.

(People who are capable of writing multiplatform projects in assembler are almost certainly not writing Roguelikes, though it does take all kinds.)

((HTML is totally a programming language.))
I am sure I played flawflessly. This was an utmost unfair death. -- gorbeh

Dungeon Master

Posts: 1531

Joined: Saturday, 5th March 2011, 06:29

Post Wednesday, 19th June 2013, 13:12

Re: How did you learn coding?

pratamawirya wrote:
giygas wrote:
mumra wrote:If you want easy cross-platform I advise HTML.

ftfy

It's not a programming language, duh.


My advice was actually HTML+Javascript, you would struggle to make a HTML game without any Javascript, basically I have no idea what giygas was talking about but I suspect he wasn't paying attention to the rest of the discussion, well what's new?

Halls Hopper

Posts: 74

Joined: Monday, 1st April 2013, 15:42

Post Wednesday, 19th June 2013, 18:28

Re: How did you learn coding?

When I was really really really young, I somehow learned to write .bat scripts on Windows 98.
When I was really really young, I played around with HTML and copy-pasted JavaScript code from the internet.
When I was really young, and mobile phones ran Java applications, I found a thing called MIDletPascal and learned some Pascal (and basics of programming).
Then PHP. Then Python, JavaScript (actually learned), Ruby, C, Java, C++, Clojure, Scala, Go, Objective-C…
User avatar

Slime Squisher

Posts: 382

Joined: Thursday, 12th April 2012, 02:07

Location: Standing right behind you...

Post Thursday, 20th June 2013, 03:23

Re: How did you learn coding?

mumra wrote:My advice was actually HTML+Javascript, you would struggle to make a HTML game without any Javascript, basically I have no idea what giygas was talking about but I suspect he wasn't paying attention to the rest of the discussion, well what's new?


You CAN make a game with pure HTML. It just won't be very fun (to make or play), and the tedium of configuring every single page and every single link would be horrid, so much so that you would need a program to code your program. And HTML is SO a programming language.

It is cross-platform though. :lol:
Jabberwocky wrote:You came back on the forums. Everything in the corner has been worse since 11/4/12. It got better when you left, but now it's bad again.


"You cannot grasp the true form of Giygas's attack!"

Spider Stomper

Posts: 206

Joined: Tuesday, 30th April 2013, 15:58

Location: Mittleres Rheintal

Post Thursday, 20th June 2013, 11:37

Re: How did you learn coding?

I realy want to learn coding.
Du hast dich zu weit vorgewagt, (Hinter diesen Mauern!) dich durch dieses Tor gewagt! (Hinter diesen Mauern!)

Dungeon Master

Posts: 1531

Joined: Saturday, 5th March 2011, 06:29

Post Thursday, 20th June 2013, 15:29

Re: How did you learn coding?

giygas wrote:
mumra wrote:My advice was actually HTML+Javascript, you would struggle to make a HTML game without any Javascript, basically I have no idea what giygas was talking about but I suspect he wasn't paying attention to the rest of the discussion, well what's new?


You CAN make a game with pure HTML. It just won't be very fun (to make or play), and the tedium of configuring every single page and every single link would be horrid, so much so that you would need a program to code your program. And HTML is SO a programming language.

It is cross-platform though. :lol:


Oh, I didn't say it was impossible, just "you would struggle". And I'm not entirely disagreeing that it's a programming language, by a very loose definition of "programming language" anyway; at least, some things you can do with it are programming-like. Actually no, it's not a programming language, it's just a language, but does this definition really matter?

aegis wrote:I realy want to learn coding.


Start by googling "learn to code".

Vestibule Violator

Posts: 1500

Joined: Monday, 3rd January 2011, 17:47

Post Thursday, 20th June 2013, 17:15

Re: How did you learn coding?

mumra wrote:
aegis wrote:I realy want to learn coding.


Start by googling "learn to code".

Or go back in time to the early 1980s and type in page after page of machine language into MLX from Compute!'s Gazette. But probably mumra's way is easier.

For this message the author rebthor has received thanks:
giygas
User avatar

Slime Squisher

Posts: 382

Joined: Thursday, 12th April 2012, 02:07

Location: Standing right behind you...

Post Thursday, 20th June 2013, 21:15

Re: How did you learn coding?

rebthor wrote:Compute!'s Gazette

Better written as Grammers!'s Gazzete; technical writers these people are not.
Jabberwocky wrote:You came back on the forums. Everything in the corner has been worse since 11/4/12. It got better when you left, but now it's bad again.


"You cannot grasp the true form of Giygas's attack!"

Return to Crazy Yiuf's Corner

Who is online

Users browsing this forum: No registered users and 56 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.