« first day (515 days earlier)      last day (3801 days later) » 

22:01
What do you mean with "interact with multiple other arrays"
<?php
$mood = 'mellow';
$tempo = 'slow';
$songCharacter = array(
	'Mood' => '$mood,
	'Tempo' => $tempo
);
$moodColors = array(
	'mellow' => array(
		'Blue',
		'Violet',
		'Purple'
	),
	'energetic' => array(
		'Orange',
		'Yellow',
		'Green'
		),
	'aggressive' => array(
		'Red',
		'Black',
		'Gray'
	)
);
$tempoAdjectives = array(
	'slow' => array(
		'Boring',
		'Sluggish',
		'Interminable'
	),
	'medium' => array(
		'Agreeable',
		'Neutral',
		'Typical'
	),
	'fast' => array(
		'Stressful',
		'Angry',
^^ if this helps... $mood will interact with $moodColors to select which nested array to select a random value from (this is for a name generator)
So on for $tempo / $tempoAdjectives, and more arrays later
I'm not sure I really understand what you want to do. Maybe because I don't know PHP well. Generally speaking I think it is good to pack together things that are logically connected
so I'm totally in favour of having a $songCharacter variable and in using its elements to choose a mood color and a tempo adjective
Well TTGH, back in a bit with... more PHP yay!
I think you might consider to have a function that takes an array like $songCharacter and returns another array of "things associated to that character"
something like array('color' => ..., 'tempoAdjective' => ...)
I think I'll go to sleep soon
see you later
And..... I need +7 for rep cap today.... on SO... ;)
> You've earned the "Strunk & White" badge (Edited 80 posts).
22:10
@rolfl Are you cheating on us?
Santa doesn't work on Stack Overflow.
TTGTB
Nah, not cheating, I maxed out here on CR too..... just got in to a JDOM question on SO today, and stuck around a bit.
22:31
nvm Found a nice sample code, I got it :D
Someone tell me I'm crazy for wanting to learn PHP, and show me how much simpler and cleaner the above code would be in Python...
@Phrancis why not just use Javascript if you are doing something in the browser?
I'm not necessarily wanting to do it in a browser
is there any particular goal you have in learning php, or are you just learning another language for the hell of it?
Although I'm not opposed to using a browser and JavaScript, if it's better than PHP.
I've chosen PHP as kind of a bridge to learn to think outside the SQL mindset and learn more general concepts. Since PHP+SQL are often together in questions on CR I figured I would kill 2 birds with 1 stone and make a dent into the PHP mountain of zombies.
22:40
@Phrancis - the common thinking nowdays, is to use Javascript on the client, and also on the server.
You will be doing yourself a favour if you do node.js on the server, and Javascript on the front too.
Have no idea what you just said lol.
@JaDogg - for 6GB you need a streaming parser, and a that limits you to either SAX, or StAX. Since StAX is ugly, and worth less than .... PHP, go with SAX, it's a trick to get the state-machine going, but it's fast when you do.
@Phrancis the problem with PHP is that it doesn't seem to have basic things such as Dictionaries that most other languages have. and also the syntax is just abysmal. I think you would be better off with a more sensible language
@bazola OK... Could you give me a simple concrete example of say... JavaScript, and what the syntax would look like for what I started above? (nested arrays) I'm a very visual person...
I have noticed the syntax in PHP is a serious PITA.
ill try, hold on
22:47
And... the manual sucks.
@rolfl Nice
@Phrancis I am having a bit of trouble coming up with this in Javascript.. still trying though
OK don't spend too much time lol.
Yay, SE alpha iPad app, here I come!
Ready for reopening & comment clean-up:
2
Q: Dependency Injection into an Abstract Class

Nikolaii99Me and another developer have recently forked and taken over an abandoned, open-source project. I have also been reading articles and watching videos by Misko Hevery: http://misko.hevery.com/code-reviewers-guide/ https://www.youtube.com/watch?v=wEhu57pih5w&list=PLD0011D00849E1B79 So when I was...

23:03
BBL @bazola just tag me when you post it here thanks :D
@Mat'sMug .... is this... VB? : codereview.stackexchange.com/questions/64459/…
If you can identify the code, please tag it.
@SimonAndréForsberg - codereview.stackexchange.com/review/first-posts/26125 - review pass with those tags ... ;-) Should be publicly shamed... Oh, I just did that!
23:33
Congratulations guys on graduating soon!
@hichris123 Thanks ;-) .... though 'soon' is 6-8 months... you know?
@rolfl Well, yeah, but you beat PP&CG!
2
That we did... we were sort of expecting a joint-announcement, but it did not turn out that way... do the PP&CG folk have any feedback on that?
in Charcoal HQ, 5 mins ago, by hichris123
@Doorknob CR is graduating. :P
I guess we'll see.
2 days ago, by Mat's Mug
(hear that, @DoorKnob?)
23:42
@Phrancis a random name generator is definitely not something trivial in any language.. not very proud of what I am coming up with here
23:57
I started learning Javascript on codecademy but it might be a bit slow for you. It definitely walks you through all the basic syntax, and basic programming ideas

« first day (515 days earlier)      last day (3801 days later) »