Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - MyndFyre

Pages: 1 2 3 [4] 5 6 ... 206
46
General Discussion / Re: Let's hear it!
« on: November 04, 2011, 11:11:12 pm »
My biggest complaint with XML is the dependence on string literals/ constants. I know you can't get around having them and 'elegant' is probably the wrong word to use- I think the thing I hate the most about XML is the fact that code is I can't get around having to litter my code with so many string constants/ literals.  I just normally don't associate elegance with requiring code to have lots of string constants and literals.
But the trade you get in return is that the resultant data is very easy to understand by humans.  Usually.

You can always swap out the literals with constants. 

Either way, I don't see how that's any different than, say, reading an .ini file for settings or whatnot.

47
General Discussion / Re: Let's hear it!
« on: November 03, 2011, 11:31:25 pm »
I ABSOLUTELY HATE WORKING WITH XML.

Don't you have some library to use? I'm not exactly fond of it myself, but it's never been a pain to work with because there's such good support for it.

That's not the point, there's no such thing as elegant code whenever you have to work with XML, no matter what library you use IMO.
Have you used .NET 3.5+ LINQ-to-XML?  It's as close to elegant as I've ever seen.  I understand VB makes it even better (it's a native data type), though I've never used that.  I like composing:

Code: [Select]
var doc = new XDocument(
    new XDeclaration("1.0", "utf-8", null),
    new XElement("Root",
        new XElement("FirstLevelDeep",
            new XElement("SecondLevelDeep",
                new XAttribute("Value", 2)
            )
        )
    )
);
produces:
Code: [Select]
<?xml version="1.0" encoding="utf-8" ?>
<Root>
    <FirstLevelDeep>
        <SecondLevelDeep Value="2" />
    </FirstLevelDeep>
</Root>

Traversing it is really cool too, because you can apply LINQ operations to the traversals.  For example, take my sample XML configuration file from JinxBot - http://code.google.com/p/jinxbot/source/browse/trunk/development/projects/JinxBot/Configuration/SampleConfig.xml

Here's the code that reads it: http://code.google.com/p/jinxbot/source/browse/trunk/development/projects/JinxBot/Configuration/ConfigurationLoader.cs#73

That's a little complicated, but here are the details:
Code: [Select]
<JinxBotConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <Globals>
       ...
    </Globals>
    <Profiles>
        <ClientProfile ProfileName="DarkTemplar~AoA on useast.battle.net (Starcraft: Brood War)">
            <Client>SEXP</Client>
            <VersionByte>209</VersionByte>
            <PrimaryCdKey>1111111111111</PrimaryCdKey>
            <GameExePath>C:\Gamefiles\STAR\Starcraft.exe</GameExePath>
            <StormDllPath>C:\Gamefiles\STAR\Storm.dll</StormDllPath>
            <BattleSnpPath>C:\Gamefiles\STAR\Battle.snp</BattleSnpPath>
            <Username>DarkTemplar~AoA</Username>
            <LockdownImagePath>C:\Gamefiles\STAR\STAR.bin</LockdownImagePath>
            <Password>password</Password>
            <ServerUri>useast.battle.net</ServerUri>
            <ServerPort>6112</ServerPort>
            <CdKeyOwnerName>Robert Paveza</CdKeyOwnerName>
            <Ping>Normal</Ping>
        </ClientProfile>
        ...
    </Profiles>
</JinxBotConfiguration>
This code gets the root element, JinxBotConfiguration:
Code: [Select]
document.Root
This then gets the single child "Profiles" element:
Code: [Select]
document.Root.Element("Profiles")
This then gets a generator which provides foreach access over the internal "ClientProfile" elements:
Code: [Select]
document.Root.Element("Profiles").Elements("ClientProfile")
Then instead of iterating over it with a foreach, I use a projection function, which converts it into a real class object:
Code: [Select]
document.Root.Element("Profiles").Elements("ClientProfile").Select(profile => CreateProfileFromElement(profile))
That expression yield an IEnumerable<ClientProfile>, which can be foreach'd over or turned into an array or whatever.

I think it's pretty cool... :)

48
General Discussion / Re: Fuck! It's the INTERNET! y so srs?
« on: November 02, 2011, 09:38:55 pm »
omg you're old. 33 is not a kid btw.
It will be soon.... :)

49
Blizzard, WoW and Bots / Re: World of Warcraft: Mists of Pandaria
« on: October 25, 2011, 12:55:52 am »
So I started a hunter in vanilla WoW.  The hunter in question lasted all the way to level 37 where she stopped going anywhere and just hid in the tavern in Booty Bay.

About three weeks ago, I started a new hunter in my horde guild.  Sent him my two heirloom pieces (tattered dreadmist robe, lulz) and let him go.  Took two gathering professions - herbing and skinning.

After about 2 days of played time, I'm 67 verging on 68.  I've made 2200g selling herbs (I'm hanging onto the leather for taking on leatherworking once I hit 85... maybe).  I won't have enough for 280 flying once I hit 70, but definitely by the time I hit 80.  And questing gear is way more than enough.

And frankly... the hunter changes are amazing.  I *hated* playing the hunter before, hence why the old one never made it past 37.  The new hunter is awesome.

50
OK, seriously though.

I do happen to like Google Music.  That's pretty handy.

I also like, in theory, the ability as a developer to have a completely abstracted hardware model. 

That's about it, though.

51
It solves the problem of there not being a Cloud.  Basically, it's a sham for 98% of what it's being marketed for.

52
General Discussion / Re: Do you "show respect?"
« on: October 07, 2011, 12:25:16 pm »
Not necessarily. I know people with Ph.D.s that are totally useless. Several of them were my professors. :)
While I agree that it's not a hard and fast rule, I would still say that many of them are worth respecting.  And I think that I would still tend towards giving them respect and then having to take it away.

53
General Discussion / Re: Do you "show respect?"
« on: October 06, 2011, 10:57:32 pm »
For what it's worth, if somebody has *done* something that deserves respect, it's a little different. But having a title, going to school for who cares how long, etc, isn't sufficient. You have to *do* something, and prove that you deserve respect.

I know a lot of powerful people who have bullshitted their way into positions of power. They don't get my respect.
Having done the 4+6 years to earn a Ph.D. isn't doing something that deserves respect?

54
General Discussion / Re: Do you "show respect?"
« on: October 05, 2011, 07:42:31 pm »
It's always interesting when Rule and I agree a bit :)

55
General Discussion / Re: Do you "show respect?"
« on: October 05, 2011, 01:18:34 pm »
I guess I'm confused; what is the difference, in your mind, between 'showing respect' and 'being polite'?

The military example you gave is an interesting one.  I've known a lot of military folks because I volunteer with the American Legion.  Generally speaking, I'm predisposed to giving military or ex-military members more respect by default.  But I'm not sure that I 'show' that more readily than not; simply that I regard them more highly, trust that they will be honest more readily, etc.

I happen to disagree with iago, too, with regard to the comment 'because they have a title.'  I very much disagree with almost all of Pres. Obama's policies, and I think that he is leading the country down a destructive path; but I still respect the fact that he is the President.  A lot of people I know do not, and it annoys me.

'Showing respect,' though, is a tough one.  I try hard to be polite in general (at least IRL - online notwithstanding), whether someone has my respect or not.  Being civil to other people should happen - even if a person is a bad person, that person is still a person, and has some basic measure of value just based on that fact.

56
General Discussion / Re: Bank takes family home!
« on: October 04, 2011, 10:19:04 pm »
The funniest part about it is that he's so retardedly ignorant about what is actually happening to his parents' property.

A short sale (something I looked into because I might have bought a short sale) is when you sell your house for less than the balance of the mortgage because you can't afford to keep it.  The banks basically say, "OK, we have a contract that says that you're going to owe us this, and we took a risk in giving you a loan.  Now you're asking if you can pay back the loan later, with less collateral, because you can't afford to make the payments that you currently owe."

The banks are actually helping this guy's family out and he's just screaming like an idiot.

57
General Discussion / Re: Let's hear it!
« on: October 04, 2011, 10:11:17 pm »

58
Without looking it up, no, I don't know what stacking of it is.
And further... nobody cares.

59
Gaming / Re: Max Payne 3 March 2012
« on: September 25, 2011, 06:03:47 pm »
I loved 1 and 2 as well.  My computers ought to be able to run it anyway, though I always played them on Xbox, so I'm not sure if I'll stick to PC.

60
General Discussion / Re: Cleverbot "almost" passes the Turing test
« on: September 16, 2011, 11:03:08 am »
It's because the test took place in India.  Did you see how the people in the study were only 63% human?

(Someone make sure deadly can't see this thread).

Pages: 1 2 3 [4] 5 6 ... 206