 |


 |
|
 |
 |
 |
 |
So after coming across the greatest syntactical frustration to date today, I decided to do a bit of research as to why I dislike Java, and why I do like PHP. I'm sure you don't care,b ut I like writing stuff down, and I figure you're a great sounding board because you'll read it and then tell me you don't care! :D The syntax issue regards the method by which Java handles Arrays. Compare the following snippets of code, which do the same thing:
PHP Simple Nested Array
$sample_array = array( array( "Value1.1", "Value1.2" ), "Value2", array( "Value3.1", "Value3.2" ) );
echo $sample_array[1][1]; // Will output: Value1.1
Java Simple Nested Array
String[] sample_array = { { "Value1.1", "Value1.2" }, "Value2", { "Value3.1", "Value3.2" } };
System.out.println( sample_array[1][1] ); // Will output: Value1.1
Thus far, PHP and Java largely resemble one another. There are minor syntactical differences, but on the whole they seem to match one another fairly well. Let's move into some more complicated issues!
PHP Nested Array with Additions
$sample_array = array( "Value1", "Value2", array( "Value3.1", "Value3.2" ) );
$sample_array[] = "Value4";
echo $sample_array[4]; // Will output: Value4
Java Nested Array with Additions
String[] sample_array = { { "Value1.1", "Value1.2" }, "Value2", { "Value3.1", "Value3.2" } };
String[] temp_array = new Array( sample_array, 4 );
temp_array[4] = "Value4";
sample_array = temp_array;
System.out.println( sample_array[4] ); // Will output: Value4
Two additional lines of code to do this, and we had to create a wholly new variable. Why? Because Java cannot handle this type of memory handling on the fly. Why? I have no clue. A flaw in the implementation as far as I can see. But let's go one step further! There are more things you can do with PHP Arrays that Java can't even pretend to mimic!
PHP Array with String Keys
$sample_array = array( "Key1" => "Value1", "Key2" => "Value2" );
echo $sample_array["Key1"]; // Will output: Value1
And this is my current problem. I need to be able to do the array with string keys in Java. Supposedly HashMaps are the equivalent, but I'm struggling to get those to work in a simple, kindly method. Were Java actually useful, it would allow me to do it like this:
Hypothetical Java Array with String Keys
String[] sample_array = new Array( String, 4 );
sample_array["Key1"] = "Value1";
sample_array["Key2"] = "Value2";
System.out.println( sample_array["Key1"] ); // Would output: Value1
Unfortunately, Java throws an error when I try to do that. String is invalid type for array key. Something like that. :) Even with the extra coding to account for Java's inability to define Arrays properly on the fly, having String Keys is almost a necessity if you want your language to actually be legible to anyone other than yourself. I suppose I can do it with some declared constants equating to a value. Kinda sucky, but it is what it is.
Update: I have since discovered HashMaps and the ArrayList libraries. They do sorta get around this. it's still a lot more code than is required in PHP, and the worst part is that it requires you to know HashMaps and ArrayList exist. Thus the fundamental flaw: Java relies on a lot of libraries. Tags: code, rants
|
 |
 |
 |
 |
|
 |
 |

 |
|
 |
 |
 |
 |
|
 |
 |
Mystic Theurge
44% Combativeness, 33% Sneakiness, 85% Intellect, 69% Spirituality
|
Brilliant and spiritual! You are a Mystic Theurge!
Score! You have a prestige class. A prestige class can only be taken after you’ve fulfilled certain requirements. This may mean that you’re an exceptionally talented person, but it probably doesn't.
The Mystic Theurge is a combination of a cleric and a mage. They can cast both arcane and divine spells, and are good at both, making them pretty terrifying on the battlefield. They have more raw spellpower than just about any other class.
You're both intelligent and faithful, but not violent or deceitful. I guess that makes you a pretty good person.
|
|
My test tracked 4 variables How you compared to other people your age and gender: | You scored higher than 26% on Combativeness | | You scored higher than 34% on Sneakiness | | You scored higher than 91% on Intellect | | You scored higher than 92% on Spirituality |
|
|
 |
 |
 |
 |
|
 |
 |







 |
|
 |
 |
 |
 |
|
 |
 |
I've been thinking for a few weeks now that I ought to really get serious about writing some kind of a regular blog. Something more than just a journal or insight into my mind, but rather a focused, topic-driven 'soapbox' for the damnedmage. The first major hurdle for me was coming up with a topic; I knew it would have to do with gaming, as that's what I'm most passionate about, but I didn't know what specifically. Tonight, though, I had something of a revolution when ahumblepen suggested that I write about what it means to be a good Dungeon Master. Of course, that's a little too narrow, but it was a good spark for an idea. She's been a player in my D&D games for nearly four years, now, and she was able to identify that in these four years she has learned that most times I'm a good DM, sometimes I'm a scary DM, and when I'm really on my game, I am both. I believe I am able to identify those times, myself, through sheer observance of my players, and I believe I know why those things occur. As a player in other peoples games, I am further able to identify what is lacking, and I believe I have a lot to say on what it takes to be a great Game Master. Granted, it's a soapbox, but it's my soapbox, so when I stand up on it I can pretty much say whatever I want. I also plan to give advice on how to develop new settings and worlds; I have been at it for almost fifteen years, now, and I've developed four settings to near completion (in my head, at worst; on paper at best) across three genres, and I have another that I've only recently begun. I'll also be doing reviews of game-related products (mostly Wizards of the Coast, but I may also start branching out into White Wolf or WizKids when I feel a bit more confident that I understand their systems. All this to say, I think I've finally settled on a focused enough topic to write about, and I think I have a lot to say. The only problem remaining is: What should I call this blog? Presently, I've got a few ideas in mind, but I'm looking for more; something that will just be the right answer. The current list is as follows (listed in order of my preference from best to worst) * Zen and the Art of Game Mastering * Planned Improvisation * Death of the Dice * Campaign Notes * Dungeons Unearthed * House Rule 74 * By the Dice And the gag list (which I may randomly use on April 1st or something) * Daritharran's Guide to the Planes * Bradley Nite, Gazebo Hunter I am more than open to suggestions or further ideas that might better work for my aim, or commentary on any of the names. My biggest goal is not to tie myself to any one system, as most of the things I intend to say should be universal across all games that involve players and a game master, be they Dungeons & Dragons or entirely diceless. I'll keep the above list updated with the suggestions I like as they come in. Thanks for your help! mood: Planning
|
 |
 |
 |
 |
|
 |
 |

 |
|
 |
 |
 |
 |
|
 |
 |
It began with my laptop's power source failing. Like utterly and completely failing. Like I couldn't even get it to flicker on the power button pushing. $100 later, I learn it's definitely not the power cord. Or rather, it is, but that's not the ONLY thing it is. It also happens to be the power connector to the motherboard. ANOTHER $150 later, I finally have it fixed, and can regen it. Five days of bleh that caused, as I fell behind on every project I had. Then the electric company decided to cut power to my house for non-payment. I'd asked for (and been approved for) an extension to this Friday for half of the amount, and two weeks from this Friday for the rest. Apparently they forgot they'd said okay to that; I had to borrow a lot of money from my dad. That makes my life even more difficult, as my father does not like giving out money to me for any reason. I don't blame him; I hate even asking for it, but it doesn't help the process along here. Took em almost 24 full hours to turn me back on. :( Now this morning, I wake up to find my laptop speaker clicking incessantly. I mean violently and disturbingly. In we go diving to figure out why. I still haven't figured it out; I just unplugged the damned speaker wholesale. Only I've discovered that in the process, I bumped the keyboard connector or something, because now five very vital keys on the left side of my keyboard are utterly dead. I have lots of USB keyboards, and I use one with the laptop 90% of the time anyways, but there's that 10% I can no longer do, now. I'll try opening it back up and re-seating the keyboard again in day or two. I'm not touching it right now. I'm too upset. God, please see fit to have Cox: Atlanta, or Cognizant in San Jose call me back. I really need one of those jobs; and quickly. I'm very nervous and worried about money, and my sources of income are dying on me with each day. :( mood: worried
|
 |
 |
 |
 |
|
 |
 |



|
 |
|
 |