Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 413 414 [415] 416 417 ... 796

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

MorleyDev

  • Bay Watcher
  • "It is not enough for it to just work."
    • View Profile
    • MorleyDev
Re: if self.isCoder(): post() #Programming Thread
« Reply #6210 on: August 30, 2014, 06:08:24 am »

Nifty. I've ordered an Oculus Rift recently, so should get to play with it sometime around October. Now, if only I were a patient man :(
« Last Edit: August 30, 2014, 06:20:02 am by MorleyDev »
Logged

MC Dirty

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6211 on: August 30, 2014, 07:41:01 am »

For example, Dwarf Fortress in an Oculus Rift.
[snip]
Which means games played within games. And if I can figure out the right combination of hacks, programming & compiling from within a copy of the program being programmed and compiled.
Ah, so do windows that are on top of other windows actually appear "on top" in regards to the 3D?
If so, that is extremely nifty.

Edit:
That's mostly fundamental differences in language, though.
That may be so, but I still don't see why it couldn't be made more readable.
You can write an entire Python program without defining a single class. Not only that, but it's not as strongly typed as Java, with built-in duck typing and such.
Oh wow, that just seems like a mess.
I dunno, I just personally prefer strong typing. It seems to me like I would have to know the entire implementation of a function to discern whether it works with a certain object. The Python example in the article you linked exemplifies this perfectly.
With strong typing, I just look at the argument types and I instantly know.
« Last Edit: August 30, 2014, 07:49:09 am by MC Dirty »
Logged

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: if self.isCoder(): post() #Programming Thread
« Reply #6212 on: August 30, 2014, 07:59:53 am »

You're conflating strong typing and dynamic typing, I think.

Dynamic typing is when variables don't have explicit types on declaration. Python, yes; Java no.
Java has static typing, an int is always an int in that scope.

Strong typing is when variables of different types can't be mixed together. Javascript has weak typing, where you can add a string to an int and get a result. You can't do that in Python, nor in Java.

I don't think you'd need the entire implementation of a function. There are a few objects that do certain things (like iteratables), some that are custom and non-interchangable (usually a library's custom objects, eg Request), and primatives (str, int..).  You just need the documentation: look at the method description, and note whether it says argument X can be an iteratable, or if argument Y is a string. You could also just trial-and-error. Unlike Javascript, Python complains loudly when unexpected things happen, such as you supplied a string when it wanted a BeanCounter object.

Also, apparently you can make Java objects ducktypeable using reflection somehow...
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

alway

  • Bay Watcher
  • 🏳️‍⚧️
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6213 on: August 30, 2014, 04:49:49 pm »

For example, Dwarf Fortress in an Oculus Rift.
[snip]
Which means games played within games. And if I can figure out the right combination of hacks, programming & compiling from within a copy of the program being programmed and compiled.
Ah, so do windows that are on top of other windows actually appear "on top" in regards to the 3D?
If so, that is extremely nifty.
The windows themselves are 2D, just like on your monitor. Attempting to duplicate windows aero behavior in 3D would be a nightmare for numerous reasons, and so I doubt anyone in their right mind would bother. For that, you would be better off trying to create a 'fake monitor' driver or something which circumvents most of the windows stuff to do your own compositing; which would be just as much a pain as it sounds like. Though it would probably also let you create as many virtual desktops as your machine could handle, as I suspect you could circumvent the issues which normally only allow you to have a few monitors.

The code for capturing your desktop isn't all that complex (I was working on it myself before realizing how incredibly likely it was that something like Deskopy already exists), it's just difficult to make it not incredibly slow. You can easily access the bitmap of it through GDI; it's just that copying it requires blitting (thus putting GDI well in front of MS Clippy in terms of "Why, dear gods of blood and vomit, did you allow such a thing to exist?") and so is incredibly slow. The tricky part is really feeding through input properly in addition to that. So this is pretty much just a nice container of solved problems.
Logged

MagmaMcFry

  • Bay Watcher
  • [EXISTS]
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6215 on: August 31, 2014, 06:38:17 am »

Coding Humor (JPG Image)
Huh, I've actually never seen programming books like that before. Mine are all excellent.
Logged

Moghjubar

  • Bay Watcher
  • Science gets you to space.
    • View Profile
    • Demon Legend
Re: if self.isCoder(): post() #Programming Thread
« Reply #6216 on: August 31, 2014, 12:46:58 pm »

Coding Humor (JPG Image)
Huh, I've actually never seen programming books like that before. Mine are all excellent.

Mine is the internet, more or less.
Logged
Steam ID
Making things in Unity
Current Project: Demon Legend
Also working on THIS! Farworld Pioneers
Mastodon

Lightningfalcon

  • Bay Watcher
  • Target locked. Firing main cannon.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6217 on: August 31, 2014, 12:51:30 pm »

Coding Humor (JPG Image)
Huh, I've actually never seen programming books like that before. Mine are all excellent.

Mine is the internet, more or less.
The internet is very much like that.
The first project my AP Comp Sci teacher assigned was a program for finding the first x amount of prime numbers that a user specifies.  We didn't even do a hello world program.  He just spent a day going over some of the basic commands, and then gave us that. 
Or, as someone from my class last year put it, "I'm sure I would find this funny if we actually had textbooks"
« Last Edit: August 31, 2014, 12:55:17 pm by Lightningfalcon »
Logged
Interdum feror cupidine partium magnarum circo vincendarum
W-we just... wanted our...
Actually most of the people here explicitly wanted chaos and tragedy. So. Uh.

alway

  • Bay Watcher
  • 🏳️‍⚧️
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6218 on: August 31, 2014, 02:16:57 pm »

Programming textbooks are for people who like wasting money, wasting space in their apartments, and wasting space in their cars when they move. The internet was more or less built for and by programmers and so contains docs for everything which are more thorough and up to date than any textbook. And there are more (and better) tutorials for doing everything, along with answers to just about every problem you will ever encounter until you're doing expert-level stuff.

Or to put it another way, you and everybody you're competing with a job for is always connected to the sum of all programming knowledge on the internet. You need to more savvy about using that to your advantage than kids who grew up with smart phones that have a search functionality built in, or you will find yourself stuck in the backwaters of programming. Just because it wasn't explicitly explained doesn't mean you shouldn't be able to figure it out or just find the solution within 12 typed letters and 4 mouse clicks.
Logged

LoSboccacc

  • Bay Watcher
  • Σὺν Ἀθηνᾷ καὶ χεῖρα κίνει
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6219 on: August 31, 2014, 03:52:11 pm »

playing with netbeans 8 now that a couple annoying bugs are squashed, stream refactorings are almost like magic

http://youtu.be/bA6aeoAOL2Q
Logged

Reelya

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6220 on: August 31, 2014, 04:43:52 pm »

IDK, I have a set of the official OpenGL reference manuals, those were invaluable for getting stuff done and much easier to use that searching for the same shit on websites.

Maybe low-level programming stuff is better with the web than introductory textbooks, but for a specific reference manual for something that's already a finalized API a good book can be so much easier to use because you don't have to switch windows for a start.

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: if self.isCoder(): post() #Programming Thread
« Reply #6221 on: August 31, 2014, 04:59:32 pm »

Have two monitors helps!

The main disadvantage of books is the lack of search. Sure, they have indexes, but computer's find is much more powerful.
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

MagmaMcFry

  • Bay Watcher
  • [EXISTS]
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6222 on: August 31, 2014, 05:12:45 pm »

Actually it's been a while since I saw an online tutorial of the same quality that my books have. All the tutorials I've seen online are either technical specifications in disguise, quick start guides that show you how to do stuff without really explaining why that works, guides to specific applications of a language rather than to the language itself, tutorials by a series of examples which skip all the language fundamentals, or simply interactive feature demos for non-programmers. None of them are really good at conveying a broad and deep understanding of the language, which is probably because those online tutorials are usually much shorter than a good book.
Logged

Gentlefish

  • Bay Watcher
  • [PREFSTRING: balloon-like qualities]
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6223 on: August 31, 2014, 06:07:28 pm »

Yeh, books are always gonna have a special place in my heart. They're easy to search through, and they often really help explain a lot of things, especially in terms of memory management. My data structures book has been an invaluable help to me.

Mephisto

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6224 on: August 31, 2014, 06:29:27 pm »

You might get lucky and find a professor who actually cares as well. I've got several books (in his words, they're not textbooks) that are relevant to this day and will remain relevant.
Logged
Pages: 1 ... 413 414 [415] 416 417 ... 796