Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 107 108 [109] 110 111 ... 796

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

Levi

  • Bay Watcher
  • Is a fish.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #1620 on: February 19, 2012, 11:18:37 pm »

Hehe, nice!
Logged
Avid Gamer | Goldfish Enthusiast | Canadian | Professional Layabout

olemars

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #1621 on: February 20, 2012, 04:21:32 am »

Although the cool thing about linkedlists is that if you are building your own, you have a lot of options to mess around with. Will it be single or double linked? Linear or circular? Or will you just say fuck it and turn it into a tree structure? The possibilities!

You dirty criminal patent infringer.
I guess that belongs more in some other thread, but it illustrates that software patents means that all programmers are guaranteed to unwittingly infringe on some ridiculous patent or other that should never have been granted. This is just one tiny example among tens of thousands.
Logged

Max White

  • Bay Watcher
  • Still not hollowed!
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #1622 on: February 20, 2012, 04:32:32 am »

That is as stupid as putting a copyright on building a house with triangular rooms. You copyright designs, not design choices.

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #1623 on: February 20, 2012, 07:53:41 am »

That is definitely WTF material, even though I already decided I wouldn't WTF anymore about USian software patents.

But why make your own if there's already really good stacks, maps, hashes, queues, deques, linkedlists, arraylists, vectors, priorityqueues, sets, multimaps, and multisets?  ;)
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))

MorleyDev

  • Bay Watcher
  • "It is not enough for it to just work."
    • View Profile
    • MorleyDev
Re: if self.isCoder(): post() #Programming Thread
« Reply #1624 on: February 20, 2012, 08:07:02 am »

It's usually for when you're doing something low-level. Those are all general case implementations, but there are some specific optimisations you can do when you can make certain assumptions about how and where a list is going to be used ^^
Logged

Virex

  • Bay Watcher
  • Subjects interest attracted. Annalyses pending...
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #1625 on: February 20, 2012, 08:24:23 am »

Although the cool thing about linkedlists is that if you are building your own, you have a lot of options to mess around with. Will it be single or double linked? Linear or circular? Or will you just say fuck it and turn it into a tree structure? The possibilities!

You dirty criminal patent infringer.
I guess that belongs more in some other thread, but it illustrates that software patents means that all programmers are guaranteed to unwittingly infringe on some ridiculous patent or other that should never have been granted. This is just one tiny example among tens of thousands.
Ha! that one doesn't count in Europe!
Logged

MadocComadrin

  • Bay Watcher
  • A mysterious laboratory goblin!
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #1626 on: February 20, 2012, 09:59:50 am »

But why make your own if there's already really good stacks, maps, hashes, queues, deques, linkedlists, arraylists, vectors, priorityqueues, sets, multimaps, and multisets?  ;)
Specific optimizations and learning experience: linked lists are remade almost on a daily basis in college classes. Hell, we had to do it twice: one in Java, and again when we were "introduced" to c++ (in quotes since most of us already had c++ experience).
« Last Edit: February 20, 2012, 02:41:16 pm by MadocComadrin »
Logged

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #1627 on: February 20, 2012, 10:11:47 am »

Specific optimizations and learning experienced: linked lists are remade almost on a daily basis in college classes. Hell, we had to do it twice: one in Java, and again when we were "introduced" to c++ (in quotes since most of us already had c++ experience).
Me, too, but those arent necessary, they're for learning purposes, but Morley has a point: sometimes you need a real specific implementation, or a specific one can be a lot faster.
I stand corrected. (again) (me and my big mouth :P )
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))

Virex

  • Bay Watcher
  • Subjects interest attracted. Annalyses pending...
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #1628 on: February 20, 2012, 10:16:56 am »

learning purposes
Not covered under patent law. You can reproduce anything to learn from it, though I recall that reproducing something to do research on it doesn't fall under fair use any more for some stupid reasons (which is a ruling that needs to be repealed asap as it defeats the point of patents)
Logged

Willfor

  • Bay Watcher
  • The great magmaman adventurer. I do it for hugs.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #1629 on: February 20, 2012, 04:20:16 pm »

The Top 10 Songs From a World called TERTOR.

Code: [Select]
Let's Go Home, Skalei  by  Makeri Ramond
Oh, Eziara  by  Opeket Hakvri
Garree, I'm Yours  by  Caitamae Graemm
Look Into My Eyes, Tavlux  by  Hardav Nitkan
At The End Of The World With Lortar  by  Thomkai Cerrach
At The End Of The World With Eziara  by  Opeket Hakvri
Let's Go Home, Reesera  by  Sawhaz Brendeb
Let's Go Home, Jondia  by  Caplal Eggezi
Hubba Hubba Friend  by  Nepora Ampdan
Why'd You Grab My Heart Jondia  by  Caplal Eggezi

... I need to expand my song title template a little bit. But anyway, I decided that it wasn't enough for my simulated beings to create music that I would only ever read about. I'd already given them the ability to have musical preferences of their own (though based on a mainstream of their culture), and write their music accordingly. And I wanted a chance to try my hand at creating midi files. So 7 hours of work later, the songs that I used to only be able to read about are things that I can hear.

These are the top 10 songs of the (entire) second world I generated now that I have the files working. The songs change every 10 seconds, and they go down the above list in order.

Now to try to make them write things that aren't love songs. Or make their love songs have an actual effect. Or something completely different. I've been plugging away at music for two days now...
Logged
In the wells of livestock vans with shells and garden sands /
Iron mixed with oxygen as per the laws of chemistry and chance /
A shape was roughly human, it was only roughly human /
Apparition eyes / Apparition eyes / Knock, apparition, knock / Eyes, apparition eyes /

Levi

  • Bay Watcher
  • Is a fish.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #1630 on: February 20, 2012, 04:40:39 pm »

Wow.  I can't wait to listen to it after I get off work.  Does it take a long time to generate the songs?

Edit:  Oh wait, my co-worker just left for the day.  Now I can slack off and listen to music all I like.
Edit 2:  Drat, windows media player doesn't seem to like the midi file. 
« Last Edit: February 20, 2012, 04:44:13 pm by Levi »
Logged
Avid Gamer | Goldfish Enthusiast | Canadian | Professional Layabout

Willfor

  • Bay Watcher
  • The great magmaman adventurer. I do it for hugs.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #1631 on: February 20, 2012, 05:00:46 pm »

I was testing my success in Winamp, and it played alright. Now I tried playing it myself in other systems. So far:

Works in:
-Winamp
-FL Studio

Doesn't work in:
- Windows Media Player
- Quicktime
- SONAR

I'm probably failing in some key aspect.
Logged
In the wells of livestock vans with shells and garden sands /
Iron mixed with oxygen as per the laws of chemistry and chance /
A shape was roughly human, it was only roughly human /
Apparition eyes / Apparition eyes / Knock, apparition, knock / Eyes, apparition eyes /

Levi

  • Bay Watcher
  • Is a fish.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #1632 on: February 20, 2012, 05:07:04 pm »

I'll try it out in a few things when I get off work.
Logged
Avid Gamer | Goldfish Enthusiast | Canadian | Professional Layabout

kaenneth

  • Bay Watcher
  • Catching fish
    • View Profile
    • Terrible Web Site
Re: if self.isCoder(): post() #Programming Thread
« Reply #1633 on: February 20, 2012, 08:54:09 pm »

re-posting from fish thread, since it's more relevant here.

The only person who will be looking at my code is me :P

And VB indentation is horrible.

I do contract software testing, two contracts I had were in the same group; so I ending up working on code I had written myself 2 years previously... and then had someone else maintain.

I literally cannot overstate the importance of good comments. I had everything commented, but a lot of them were 'what' comments, not 'why' comments.

It's vitally important to explain in comments if there is a reason you used a particular pattern/construct/method.

Otherwise you'll end up looking at your own code, and wondering what the hell you were thinking at the time.
Logged
Quote from: Karnewarrior
Jeeze. Any time I want to be sigged I may as well just post in this thread.
Quote from: Darvi
That is an application of trigonometry that never occurred to me.
Quote from: PTTG??
I'm getting cake.
Don't tell anyone that you can see their shadows. If they hear you telling anyone, if you let them know that you know of them, they will get you.

Aklyon

  • Bay Watcher
  • Fate~
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #1634 on: February 20, 2012, 09:09:32 pm »

Its called a fish thread now?
Logged
Crystalline (SG)
Sigtext
Quote from: RedKing
It's known as the Oppai-Kaiju effect. The islands of Japan generate a sort anti-gravity field, which allows breasts to behave as if in microgravity. It's also what allows Godzilla and friends to become 50 stories tall, and lets ninjas run up the side of a skyscraper.
Pages: 1 ... 107 108 [109] 110 111 ... 796