Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 484 485 [486] 487 488 ... 796

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

Orange Wizard

  • Bay Watcher
  • mou ii yo
    • View Profile
    • S M U G
Re: if self.isCoder(): post() #Programming Thread
« Reply #7275 on: April 26, 2015, 05:26:36 am »

C++17 to have modules! Hype :v
Are they in any way similar to Python modules, or is this another thing where Python calls a rabbit a smeerp?
Logged
Please don't shitpost, it lowers the quality of discourse
Hard science is like a sword, and soft science is like fear. You can use both to equally powerful results, but even if your opponent disbelieve your stabs, they will still die.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #7276 on: April 26, 2015, 05:32:52 am »

Nope, Python's modules are very much things what other languages would call modules.

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: if self.isCoder(): post() #Programming Thread
« Reply #7277 on: April 26, 2015, 05:39:59 am »

My understanding is that modules are separate bits of code that don't have to be explicitly compiled,  but can be easily included into your other code and used...
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

MorleyDev

  • Bay Watcher
  • "It is not enough for it to just work."
    • View Profile
    • MorleyDev
Re: if self.isCoder(): post() #Programming Thread
« Reply #7278 on: April 26, 2015, 08:47:36 am »

I do like the core idea of separating declaration from implementation. But with 'proper' OOP languages like C# and Java, you  accomplish separation of the two via the declaration of interfaces. This works very nicely, so you can almost never have classes be parameters on functions in those languages because every function they'd want to call is declared on the interface that class implements (obviously ignoring PODs/POCOs/POJOs and data containers (though even data containers often become IEnumerable or similar)).

Makes the OLID of SOLID much easier and more natural to follow.
« Last Edit: April 26, 2015, 08:51:16 am by MorleyDev »
Logged

Spehss _

  • Bay Watcher
  • full of stars
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #7279 on: April 27, 2015, 01:39:59 pm »

Tips for learning more about coding? My attempt at making a roguelike in C++ made me realize that I'm good enough at programming for high school/college class assignments but not anything serious. Obviously the best way to learn is to actually program stuff but it's hard to program when you don't know how some things work.

Anyone got any websites or books to recommend?
Logged
Steam ID: Spehss Cat
Turns out you can seriously not notice how deep into this shit you went until you get out.

miauw62

  • Bay Watcher
  • Every time you get ahead / it's just another hit
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #7280 on: April 27, 2015, 02:29:47 pm »

Find an open source project you're interested in, code for it for a while.
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.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #7281 on: April 27, 2015, 03:39:26 pm »

Yeah, I used DFHack for that.

Uristides

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #7282 on: April 27, 2015, 04:58:32 pm »

Find an open source project you're interested in, code for it for a while.
Any more tips on that? It's something I wanted to do it for a long time, but finding a project, what it needs, if I can do what it needs, and the possibility of just getting my code called potato tier and thrown straight in the bin makes it all sound really daunting.
Logged

Gentlefish

  • Bay Watcher
  • [PREFSTRING: balloon-like qualities]
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #7283 on: April 27, 2015, 06:09:22 pm »

I'm sure it's been recommended before, but project Euler is a good site for practicing code.

and the C++ reference site has all the standard libraries for reference, for both C and C++.

Java has Javadocs, and languages like Python and Ruby have their own dedicated documentation sites. All very useful.

Orange Wizard

  • Bay Watcher
  • mou ii yo
    • View Profile
    • S M U G
Re: if self.isCoder(): post() #Programming Thread
« Reply #7284 on: April 27, 2015, 06:12:02 pm »

Python has some of the best documentation I've ever seen.
Logged
Please don't shitpost, it lowers the quality of discourse
Hard science is like a sword, and soft science is like fear. You can use both to equally powerful results, but even if your opponent disbelieve your stabs, they will still die.

Spehss _

  • Bay Watcher
  • full of stars
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #7285 on: April 27, 2015, 07:15:50 pm »

and the C++ reference site has all the standard libraries for reference, for both C and C++.
Only problem I've had with using the official c++ documentation is that lots of the terms and vocabulary fly right over my head. So it doesn't help that much.
Logged
Steam ID: Spehss Cat
Turns out you can seriously not notice how deep into this shit you went until you get out.

Magistrum

  • Bay Watcher
  • Skilled Fortresser
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #7286 on: April 27, 2015, 08:37:44 pm »

Only problem I've had with using the official c++ documentation is that lots of the terms and vocabulary fly right over my head. So it doesn't help that much.
Ah, that's nothing to worry about, you'll start getting it straight in no time.
Just read over and guess what that could mean, if the thing don't compile try again:
Code: [Select]
while (!compiling)
{
   tryAgain(someOtherMethod())
}
If anything is really difficult you can post here or PM me or other of the C/C++/C# coders around here.
Logged
In a time before time, I had a name.

Reelya

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #7287 on: April 27, 2015, 11:29:16 pm »

It's a good idea to pseudocode everything as comments, and leave those comments in as your documentation. That way, what your code is intended to do is documented, rather than just what it actually does. This can help other people (or yourself months later) tell bugs from deliberate features.

Quote
Only problem I've had with using the official c++ documentation is that lots of the terms and vocabulary fly right over my head. So it doesn't help that much.

Asking around or reading tutorials should solve that. The reference sites are for when you already know what you want to do, and need to check the specific function call syntax for something. Stick to c++ tutorials and roguelike programming sites.
« Last Edit: April 27, 2015, 11:34:40 pm by Reelya »
Logged

i2amroy

  • Bay Watcher
  • Cats, ruling the world one dwarf at a time
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #7288 on: April 28, 2015, 03:34:57 am »

Find an open source project you're interested in, code for it for a while.
*i2amroy looks pointedly at his signature* :D
Logged
Quote from: PTTG
It would be brutally difficult and probably won't work. In other words, it's absolutely dwarven!
Cataclysm: Dark Days Ahead - A fun zombie survival rougelike that I'm dev-ing for.

Reelya

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #7289 on: April 28, 2015, 07:45:22 am »

Also, Liberal Crime Squad.
Pages: 1 ... 484 485 [486] 487 488 ... 796