Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 666 667 [668] 669 670 ... 796

Author Topic: if self.isCoder(): post() #Programming Thread  (Read 890516 times)

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #10005 on: September 10, 2016, 11:38:27 pm »

they'd already been programming for at least 10 years before making Armok AFAIK.

EDIT: in case confusion is had, they've been programming since childhood

Antsan

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #10006 on: September 11, 2016, 02:00:31 am »

Recursion never is the only solution. Looping and recursion are both, if I remember that right, Turing complete.
Logged
Taste my Paci-Fist

miauw62

  • Bay Watcher
  • Every time you get ahead / it's just another hit
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #10007 on: September 11, 2016, 02:38:35 am »

I dont use recursion a lot, but it's nice to know. The other day I used it and it felt like a pretty elegant solution.

Also, complexity notation is actually really, really simple. N is your input size (this can be anything. most commonly it's an array size such as for sorts or the magnitude of a number such as for prime factorisation.), and the thing after O indicates how your running time scales with that size. (This can also be done for memory instead of size).
Logged

Quote from: NW_Kohaku
they wouldn't be able to tell the difference between the raving confessions of a mass murdering cannibal from a recipe to bake a pie.
Knowing Belgium, everyone will vote for themselves out of mistrust for anyone else, and some kind of weird direct democracy coalition will need to be formed from 11 million or so individuals.

Antsan

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #10008 on: September 11, 2016, 02:41:29 am »

Yeah, the notation is easy. The calculations can get pretty hairy, though.
Logged
Taste my Paci-Fist

alexandertnt

  • Bay Watcher
  • (map 'list (lambda (post) (+ post awesome)) posts)
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #10009 on: September 11, 2016, 02:50:10 am »

Learn it as you need it works fine in most cases. It's also an easy way to get the motivation to learn. But like mathematics, you may not know when some method/technique would be actually useful unless you learn it in the first place. It really depends on what you specialise in. Game development is nice because there is a wealth of information available out there, presented in nice and easy to follow tutorials, so its a field where learning it as you go works quite well.
Logged
This is when I imagine the hilarity which may happen if certain things are glichy. Such as targeting your own body parts to eat.

You eat your own head
YOU HAVE BEEN STRUCK DOWN!

EnigmaticHat

  • Bay Watcher
  • I vibrate, I die, I vibrate again
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #10010 on: September 11, 2016, 11:52:24 am »

they'd already been programming for at least 10 years before making Armok AFAIK.

EDIT: in case confusion is had, they've been programming since childhood
Yeah but that early programming experience was also on weird amateur game development, so it changes nothing about my statement.  His formal education wasn't in programming at all, it was in math.
Logged
"T-take this non-euclidean geometry, h-humanity-baka. I m-made it, but not because I l-li-l-like you or anything! I just felt s-sorry for you, b-baka."
You misspelled seance.  Are possessing Draignean?  Are you actually a ghost in the shell? You have to tell us if you are, that's the rule

miauw62

  • Bay Watcher
  • Every time you get ahead / it's just another hit
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #10011 on: September 11, 2016, 02:40:33 pm »

Well, math is better for programming than philosophy or something :P
Logged

Quote from: NW_Kohaku
they wouldn't be able to tell the difference between the raving confessions of a mass murdering cannibal from a recipe to bake a pie.
Knowing Belgium, everyone will vote for themselves out of mistrust for anyone else, and some kind of weird direct democracy coalition will need to be formed from 11 million or so individuals.

TheBiggerFish

  • Bay Watcher
  • Somewhere around here.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #10012 on: September 11, 2016, 04:10:00 pm »

In other news, TFW you realize everything got screwed up because you changed the order of your method's parameters, but not those of the calling methods.  Whoops.
Logged
Sigtext

It has been determined that Trump is an average unladen swallow travelling northbound at his maximum sustainable speed of -3 Obama-cubits per second in the middle of a class 3 hurricane.

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: if self.isCoder(): post() #Programming Thread
« Reply #10013 on: September 11, 2016, 07:00:58 pm »

And that's why you need typed languages!
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #10014 on: September 11, 2016, 07:02:22 pm »

And that's why you need typed languages!

or just avoid changing method signatures

itisnotlogical

  • Bay Watcher
  • might be dat boi
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #10015 on: September 11, 2016, 11:53:46 pm »

But some day, some how, you might have to change something you've already written.
Logged
This game is Curtain Fire Shooting Game.
Girls do their best now and are preparing. Please watch warmly until it is ready.

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #10016 on: September 12, 2016, 12:36:15 am »

Then you make sure you change the types, so nothing compiles until you've corrected everything.
Logged

EnigmaticHat

  • Bay Watcher
  • I vibrate, I die, I vibrate again
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #10017 on: September 12, 2016, 12:47:53 am »

I think he was responding to Putman.
Logged
"T-take this non-euclidean geometry, h-humanity-baka. I m-made it, but not because I l-li-l-like you or anything! I just felt s-sorry for you, b-baka."
You misspelled seance.  Are possessing Draignean?  Are you actually a ghost in the shell? You have to tell us if you are, that's the rule

miauw62

  • Bay Watcher
  • Every time you get ahead / it's just another hit
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #10018 on: September 12, 2016, 12:56:38 am »

I have lost literal days to a bug like that. But, to be fair, it was BYOND, and I was modifying code a caveman created before writing was invented.
Logged

Quote from: NW_Kohaku
they wouldn't be able to tell the difference between the raving confessions of a mass murdering cannibal from a recipe to bake a pie.
Knowing Belgium, everyone will vote for themselves out of mistrust for anyone else, and some kind of weird direct democracy coalition will need to be formed from 11 million or so individuals.

EnigmaticHat

  • Bay Watcher
  • I vibrate, I die, I vibrate again
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #10019 on: September 12, 2016, 01:00:44 am »

This is why its good to have an IDE with a "search all" feature.  Or a small enough number of files you can ctrl + f them all in a timely manner.
Logged
"T-take this non-euclidean geometry, h-humanity-baka. I m-made it, but not because I l-li-l-like you or anything! I just felt s-sorry for you, b-baka."
You misspelled seance.  Are possessing Draignean?  Are you actually a ghost in the shell? You have to tell us if you are, that's the rule
Pages: 1 ... 666 667 [668] 669 670 ... 796