Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 132 133 [134] 135 136 ... 796

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

Mego

  • Bay Watcher
  • [PREFSTRING:MADNESS]
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #1995 on: March 16, 2012, 01:30:48 am »

Well, I suggest using it, rather than instantiating the array in the code like you did. It'll make things much nicer to read, and you'll have code that you can easily reuse for similar problems that give you different data.

Valid_Dark

  • Bay Watcher
  • If you wont let me Dream, I wont let you sleep.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #1996 on: March 16, 2012, 01:56:05 am »

Just finished problem 11, it took me far too long
I should have written a function to process the array, instead of loading it by hand, would have saved some time...maybe...

I won't ever see these programs again, because when I finish I delete it all and start on the next problem using the same Main.cpp file.
Logged
There are 10 types of people in this world. Those that understand binary and those that don't


Quote
My milkshake brings all the criminals to justice.

Mini

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #1997 on: March 16, 2012, 02:09:19 am »

I keep my old code (usually), just because it's nice to, when I get a similar problem, be able to copy paste code from my old things and also if I forget how to do something (which happens surprisingly often), I can go back to somewhere I've done it before and remember.
Logged

Valid_Dark

  • Bay Watcher
  • If you wont let me Dream, I wont let you sleep.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #1998 on: March 16, 2012, 02:41:37 am »

When I get to a similar problem I like to see if I can write it a different way and not have to look anything up.
All of my learning I do from a book, away from my computer, so I haven't done much programming on the computer, just learning how everything works in theory, these problems are good for me to get some real IDE experience.
Like that last problem I did was my first time ever programming with arrays, but I knew how they worked, just lacked any real experience with them.

Of course anything I write that I think has any sort of practical use I'll stow away for later use, but these problems aren't very practical for real world use.
Logged
There are 10 types of people in this world. Those that understand binary and those that don't


Quote
My milkshake brings all the criminals to justice.

Max White

  • Bay Watcher
  • Still not hollowed!
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #1999 on: March 16, 2012, 02:45:11 am »

When I get to a similar problem I like to see if I can write it a different way and not have to look anything up.

This might sound good, but in practice it isn't ideal. Learning how to look things up is insanely important! You need to be able to read documentation for all sorts of things, and be able to find answers quickly. Limiting yourself to building solutions out of just your current understanding is really a ball and chain.

Don't look for direct solutions, but if you are wondering 'How should I convert a string to an int?' then look at the documentation!

MorleyDev

  • Bay Watcher
  • "It is not enough for it to just work."
    • View Profile
    • MorleyDev
Re: if self.isCoder(): post() #Programming Thread
« Reply #2000 on: March 16, 2012, 09:37:00 am »

Programming bragging time:
For one of my coursework projects for university we had to write a fake simplified FAT File System. We were given some base code and told to implement the (many) unimplemented methods, and the final part was to add our own extensions to it. I decided my extension would be a complete rewrite from the ground up.

I present my grades in the four categories (the last one being focused entirely on the extension)


A**. I broke the rating scale.
« Last Edit: March 16, 2012, 09:41:33 am by MorleyDev »
Logged

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #2001 on: March 16, 2012, 09:38:11 am »

That certainly earns you bragging points. Gratz!  ;D
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

Darvi

  • Bay Watcher
  • <Cript> Darvi is my wifi.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #2002 on: March 16, 2012, 09:39:20 am »

I broke the rating scale.
I did that when I was 7.
Logged

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #2003 on: March 16, 2012, 09:44:53 am »

I broke it once when I was 12. Scored a -4 on a scale of 1 to 10.
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

Darvi

  • Bay Watcher
  • <Cript> Darvi is my wifi.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #2004 on: March 16, 2012, 09:46:02 am »

Suddenly my 128/60 doesn't feel so special anymore.
Logged

MadocComadrin

  • Bay Watcher
  • A mysterious laboratory goblin!
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #2005 on: March 16, 2012, 09:48:44 am »

I had a physics class that had so much extra credit, that I think, if the finals grades for classes here weren't capped at 100, I would have gotten a 200+. I literally could have skipped the final exam and had gotten a 100 in the class.
Logged

MorleyDev

  • Bay Watcher
  • "It is not enough for it to just work."
    • View Profile
    • MorleyDev
Re: if self.isCoder(): post() #Programming Thread
« Reply #2006 on: March 16, 2012, 10:15:36 am »

Yeah, it's a shame this coursework is just 25% of the module. But at least that's a guaranteed 25% I have xD Usually I just put in the minimum effort needed for the grade I want, but here I actually found the whole project interesting hence why I bothered to rewrite the whole thing :)
Logged

Telgin

  • Bay Watcher
  • Professional Programmer
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #2007 on: March 16, 2012, 02:12:10 pm »

Ah, file systems.  I used to be quite interested in the subject, back when I was interested in OS development.  For some reason, I fell into the common assumption that new OS = new file system, so I ended up spending a lot of time writing my own terribad FAT like file system.

To be fair, I did end up writing a utility that could manage images of the file system (add, move, delete and rename files and directories), which was kind of cool.  I also managed to write a two-stage bootloader in x86 ASM that was able to find the second stage by parsing and reading the file system.  That was kind of cool too.

But then the project went the way of 99.9% of hobby OS projects: I finished that much, couldn't quite decide what to do next and forgot about it.

Moral of this story: use existing tools and technology when available.  I really probably should have used GRUB and an existing file system it could read, and focus on, you know, writing the OS instead of a bootloader.

Maybe one day...
Logged
Through pain, I find wisdom.

Valid_Dark

  • Bay Watcher
  • If you wont let me Dream, I wont let you sleep.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #2008 on: March 16, 2012, 06:13:23 pm »

When I get to a similar problem I like to see if I can write it a different way and not have to look anything up.

This might sound good, but in practice it isn't ideal. Learning how to look things up is insanely important! You need to be able to read documentation for all sorts of things, and be able to find answers quickly. Limiting yourself to building solutions out of just your current understanding is really a ball and chain.

Don't look for direct solutions, but if you are wondering 'How should I convert a string to an int?' then look at the documentation!

I think you misunderstood what I meant,..
If I don't know how to do something I'll look it up, but then after I delete the code, if I have to do it again, I try to do it without looking it up again, surely learning how to do something is better than learning how to look it up...
Logged
There are 10 types of people in this world. Those that understand binary and those that don't


Quote
My milkshake brings all the criminals to justice.

alway

  • Bay Watcher
  • 🏳️‍⚧️
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #2009 on: March 20, 2012, 10:32:24 pm »

Is there anyone familiar with C++ sound libraries here? I need to know which of them is best for emulating binaural sounds similar to those in recordings like The Virtual Barbershop. I want the highest potential to localize the source of sound as I can get for a little personal project.
OpenAL I've tried, and is mediocre at best; right-left is easy to distinguish, but front-back and up-down is really almost nonexistent (though in this case, even a 2 dimensional with just front-back is sufficient).

As to the use I will be putting it to; it will be used to attempt to create an audio-only bullet hell, which is why localization is really important. Assuming a sufficient audio library can be found, it should be pretty easy to make; only a matter of sound, input, and game logic.
Logged
Pages: 1 ... 132 133 [134] 135 136 ... 796