« first day (1375 days earlier)      last day (3799 days later) » 

11:04
> The above objects are Entities. That is, they represent state in your application and have class properties holding their state.
nope
@Gordon They do represent state though? Each element has a state - so a value, a name etc
@Jimbo Entities have unique identity.
@Gordon How would you rephrase?
If something is equal by virtue of the whole of it's properties, then it's likely a ValueObject. Though I am not sure I would use that term for a Form.
Yeah, they effectively are value objects. But Entities can hold state too. Like a User entity can have isLoggedIn that represents state (I wouldn't do that, but still...)
11:07
we could argue though that a Form is a specific representation of an Entity or ValueObject
No arguing, just trying to teach / learn :-)
yes, but the Entity is distinguished from another entity on basis of the ID and not one the sum of it's properties.
> The above objects are specific representations of an Entity or ValueObject.
Done, although I feel I've removed something useful from it and need to replace it with something
reads good to me this way
@Gordon I answered it because I was reading your profile and say you were the second user to get a gold OOP badge so I started searching for oo questions :D
But thanks for letting me know, I do need to know these things and don't want to mislead others
11:12
@Jimbo yeah, the skeet is the first one to get it :)
@Jimbo I am not sure I would use getHtml on the FormElement. If you know you'll never get another representation than html then yes, else a Visitor pattern or other approach separating output format and structure would be more useful
@Gordon I was thinking that the FormElement::getHtml() method would be called within the Form for each of it's elements. I did think of a HtmlGenerator::generate(FormElement $element) but didn't want to overcomplicate. Got a link for the visitor pattern?
@DaveRandom lol
grmbl. Now I'm hating SO - can't setup automatic ssh password login because every damn response to my search "use ssh keys OOOOGA!"
I'll be having php position interview tomorrow. I am not really worried about questions but the bad thing is I have nothing to actually show off.
11:20
as if it was my choice :|
@Leri what will you ask them?
@Gordon I am applying position, so I expect questions on the contrary. Well, I'll ask basic questions about company and their goals.
@Leri yeah, wrong thinking :) you are going to work there 8 hours a day, 5 days a week so you will want to know how they work, how bad of a mess their codebase is and you want to know how your team lead ticks because you dont want to end up working for an a-hole. Make sure it's a place you want to work at.
So ask tons of questions.
Nice suggestions, thanks.
Don't be enticed by beer & pizza
11:28
I'd give you source code but judging your SO points you'd be better off with your own :P and take heed to what Gordon's saying.
Had I asked how bad of a mess this code was I'd probably still accept the job but I'd have more focus on it
Everyone's offering beer & pizza
topical. That was advertised to me yesterday for my free time on a work project
I decided to go home and earn £30p/h freelance instead.
no brainer
@Fabien you'll have to tell me where you freelance 'cos I can't get that hourly rate :O
Hmm, haven't seen cryptic in a while; is she on extended hiatus?
11:30
@Jack she asked to be banned :(
@Gordon unban her.
@Gordon ah, until eternity? ...
> This user has been temporarily suspended by a moderator and cannot chat for 19 days.
so hopefully, she'll pop in in a few days
@MoshMage The rate is about the dev more than the work. A better dev than me would charge 50
Ah, so she'll be out on parole soon heh
11:31
Up to you what you charge :P
@MoshMage Thanks. :D The problem is that I've been working on closed-source projects and they are all under-development (besides little ones that were done in a day and does not worth mentioning). So I can't say to interviewer: Look I have made this cool thing
I remember she was going get a life and all.
@Gordon shorten the period by two weeks :-) please :-)
wip up some magic coding and make a link shortner, or something; OR you can tell'el "I have no code to show 'cos all my code is so awesome the companies I've worked for are close-sourced" xD
LOL
@Fabien I see. But I'm betting you're not on one of those websites that's basically a auction-house for jobs and everyone tries to go lower than the last person?
11:34
I was checking on cryptic's status and I felt I was being rick Lusitanian rolled =/
Hi everyone, I need help regarding RewriteRule in .htaccess. Do I need change in script if I use .htaccess RewriteRule for short URL
I wonder if @Lusitanian is from PT
@Jack that's not @cryptic xD
@bwoebi What gave it away? heh
@MoshMage Nope. It's with my old workplace.
@bwoebi just staph
Does anyone use linekd in?
@Fabien aaaah! That makes sense indeed :P
I do. Well, I have one - not sure that's classified with "using"
@bwoebi I know which user she is; I found that link by doing a search in this page and then clicking on the user names ...
11:38
Does anyone use linkedin for anything?
Sure, it's where I keep all my dubious connections.
@Fabien addressbox sync for my mobile phone
Hi everyone, I need help regarding RewriteRule in .htaccess. Do I need change in php script if I use .htaccess RewriteRule for short URL
Can anyone suggest a framework better than Codeigniter, Im using currently codeigniter.. If anything better than that I can update my knoledge
Just use FallbackResource .. done & dusted.
11:42
@Wazan Symfony
@Fabien Saw Wanted yesterday :)
@Ocramius What do you use Docker for?
@Jack Liked? :)
Keyboard smash!
The keyboard smash is epic lol
The plot was a bit thin here and there, but overall nicely done =D
@Wazan all of them
when I put .htaccess file in root level, my site home page don't load, just blank screen, but short url works and long URL also show in site.
11:47
I did notice that Morgan Freeman is somehow not very capable of cursing heh; he should take lessons from Mr Jackson :)
@Jack heh. Angelina Jolie butt though
lol, no complaints there.
asi_x what does your htaccess look like?
user924016
@Jack transcendence ?
11:48
@MoshMage s/learn/fuck
Options +FollowSymLinks
RewriteEngine on

RewriteRule /si/(.*)/ ?si=$1
toomanyframeworks
@RonniSkansing are you referring to morgan freeman or angelina jolie?
@Gordon Ah, I've used the visitor pattern before but I didn't even know it was a pattern. Separate the thing that outputs data from the thing that holds it
user924016
@Jack reffering to Morgan freeman and keyboard smash
11:49
0
Q: Undefined index: txtEmpName in index.php on line 12

ramanI am new to PHP, i have write a simple Code <html> <head> <title>Hello <?= htmlentities($_GET['txtEmpName']); ?></title> </head> <body> <?php $color='red'; echo "Here is the colour you have entered $color " ?> Hello <?= htmlentities($_GET['txtEmpName'])?> <form action="" method="POST"> <t...

please help me
Hello All
I want to re-write this
@Fabien provisioning our test environment, mainly
@AlmaDo s/fuck/learn
i am new to PHP, can anyone help me, i have added a question
@raman the vairable may not exist
you can check for it using isset() or array_key_exists()
11:51
sigh un-star my that message. Without context it's what @Ocramius said
what does these functions do?
@JoeGreen
@raman please read the manual
<?
error_reporting(E_ERROR);
?>
<html>
<head>
<title>Hello <?= htmlentities($_GET['name'])?></title>
</head>
<body>
Hello <?= htmlentities($_GET['name'])?>
<hr/>
<?
if(isset($_POST['name'])):
echo '<p>';
echo 'Hello ', htmlentities($_REQUEST['name']);
echo '</p>';
endif;
?>
<form action="" method="POST">
<table>
<tr>
<td>Name</td>
<td><input type="text" name="name" value="<?= htmlentities($_POST['name']); ?>"/></td>
</tr>
<tr>
<td>Email</td>
<td><input type="text" name="email" value="<? echo htmlentities($_POST['email']); ?>"/></td>
i am refering to this code
user924016
@raman there is alot of information about what that notice/error means
I want to re-write this example.com/folder/?si=name by this example.com/name
11:52
MAN! I just posted the answer and already has a downvote
... how on EARTH?!
@RonniSkansing ok
@Ocramius I'm struggling a little to understand how to set up an environment. Fundamentally I probably don't understand docker. I got vagrant easily enough. up a box etc. But Docker I get lost in terms of what I am doing. Any recommended guides for setting up a local dev environment or anything?
Magic I just found in a project:
function is_floatlike($f) {
	return ($f == (string)(float)$f);
}
:P
seriously, is there a down-vote brigade? xD
@Fabien docker is just like commits. Every command you run in a dockerfile is just like a commit
11:54
@MoshMage yes.
@raman Staph using htmlentities
@Fabien what OS are you running?
OSX but can vagrant ubuntu
@PeeHaa lolwut
@Jack then that makes sense, somewhat
11:54
@MoshMage I dunno, I'm just making this sh*t up lol
@PeeHaa It's called maybe_float
@Fabien yeah, you need to run it in a vagrant VM then
@Fabien just spin up a box, start the docker daemon and then you're good to go
@Jack 'cos when my answer is wrong I can understand but I had just pressed "post answer" and just like that it was at -1 points xD
(that's to play with docker, for now)
OT: I'm so happy my youngest kid tries to speak more Dutch to me ;-)
@MoshMage Yeah, stuff like that happens occasionally.
user924016
11:56
@MoshMage well now you got another downvote =]
@PeeHaa why?
I posted a question, I want to re-write this example.com/folder/?si=name by this example.com/name -- when I put this file in root level, my site home page don't load, just blank screen, but short url works and long URL also show in site.
@webarto might_be_floaty() - also passes Maltesers and E
Also, both my answer and another dude (he has like.. 1k something) are being downvoted. weird.
@RonniSkansing you bastard xD
@RonniSkansing so did the other answer though
user924016
11:57
^ I have not put a downvote
user924016
but the code does not work so he should be downvoted
user924016
notice he used <?= if ...
@Ocramius Doing so now.
@Jack Will probably end up speaking Dutch with a Malay accent. That will be a pretty unique thing.
@PeeHaa is_floatlike(WOOD) doesn't work =(
11:58
hahahaha
@raman DO you know what that function does?
@DaveRandom it probably won't be Malay, though ... Singapore has their own slang
Morning
user924016
@MoshMage now it is even worse =/ use <?php
Their own version of English rather.
morning Jeff
11:59
@Jack Engrish?
Sorry, that was a bit lacist
@DaveRandom Yes!
lol. You're making me nervous xD but I didn't notice the >?=
plus, short-tags are valid in php :o
user924016
That is because you copy pasted it =]
user924016
It is not valid to echo out a if
@DaveRandom Meh, a majority of Singaporeans are racist too ;-)
user924016
12:00
@MoshMage it was <?= if (isset($_GET['txtEmpName'])) htmlentities($_GET['txtEmpName']); ?>
yeah, I forgot I need to use long-tags when posting in SO
Repwhores, gotta downvote 'em ;)
user924016
It has nothing to do with SO
user924016
you can not echo out a if
@Jack majolity of Singapoleans, you mean
I'm sorry, I'll stop now
12:00
I want to re-write this example.com/folder/?si=name by this example.com/name -- when I put this file in root level, my site home page don't load, just blank screen, but short url works and long URL also show in site.
RewriteEngine On
RewriteRule ^([^/]*)$ /store/?si=$1 [L]
@DaveRandom lol, for a moment there i thought i had made a typo
@RonniSkansing <?= if (…) …; is parsed as <?php echo if (…) … which is invalid
@MoshMage stop editing and delete. That question does not deserve even bad answers.
user924016
^ yes
user924016
@bwoebi yes that was what I was trying to say
12:02
@MoshMage You need to use long tags everywhere.
@asi_x You will need to make sure the expression does not match index.php, which it will at the moment
@RonniSkansing yes, I didn't notice it had the <?= and when I changed it I changed to <? only and someone (you?) told me I forgot the 'php' in the <? but I thought <? was a valid php tag
Not just on SO
@RonniSkansing you didn't say it explicitly
@MoshMage What if I put my xml in your php?
12:03
@DaveRandom thanks Dave
I assume I'd divide by 0
@SecondRikudo I personally am fine with <?=. If you are using <5.4 you are not supported.
user924016
@bwoebi well I did say "the code does not work so he should be downvoted otice he used <?= if ..." and "It is not valid to echo out a if" *2
user924016
I will try to be more explicit =]
12:04
lol. PM is having a meeting, i was chatting with you guys and editing a answer. brb.
@AlmaDo remind me never to introduce you to my child.
@DaveRandom well, since you're here' un-star it (: without context it's useless
@PeeHaa no..........
@RonniSkansing I do agree with the downvote if it doesn't work (as it didn't) :)
@DaveRandom Do I also need to change In php script if I use .htaccess
user924016
@MoshMage Well it is almost all reversed again now =]
@Jack I can't delv yet :/ (I mean, I have the rep points to, it's just not there)
Refresh .. at -3 it should appear
Or is that only for 20k? Not sure.
@DaveRandom <?= is cool, <? is not
12:10
<?= is only cool for 5.4 onwards.
user924016
So did Cryptic leave forever?
I think @Gordon banned her for 90 days as per her request
@Jack Nope not appeared, nvm :-(
May 13 at 8:47, by cryptic ツ
thanks. Bye everyone see you in 90 days...maybe =oD
guys, mircscripting language had a $iif() identifier that could make a if in a echo --- what's its php counterpart? a ternary?
user924016
12:12
@SecondRikudo thanks, I remembered a requested ban
user924016
most be around 70-80 days ago now
@RonniSkansing Yes, ~71 days
70 days ago
@Jack What? Sure it's possible
@MoshMage Yes, ternary
please help me... Do I also need to change In php script if I use .htaccess for shorten URL
@SecondRikudo Blah, never mind =/.
user924016
12:14
She should give herself probation without supervision
Hello anyone can help me with Laravel?
say $iif(condition, true, false)
echo condition ? true : false;
I like ternaries alot
I thought he said IIFE
and today I learned that the shortened form of it is known as an Elvis operator
12:15
?: == Elvis?
echo $feedback ?: "There is no feedback for you this time";
Anyone know why it's called Elvis?
user924016
Pretty big chance you can search that =]
@asi_x Sorry I'm not sure what you are getting at there?
@Jack Thank you, thank you very much.
user924016
In computer programming, the binary operator ?: colloquially referred to as the Elvis operator due to its resemblance to an emoticon, is a null-coalescing variant of the ternary conditional operator in languages such as PHP, Groovy, Kotlin. It is used by several other languages that use the ? : operator, which is the most common ternary operator. Binary ?:, used as an operator with two arguments around it and no characters in between, is used to obtain a value that is specified in the second argument if the first argument evaluates to null or false, and to return the value of the first argument...
12:16
@AlmaDo done
@JoeGreen ?: is an emoticon for Elvis
dafuq ... because ? is his hair?!
Correct
?:-)
user924016
I can not imaging it..
12:17
user924016
Thanks I get it now
user924016
lol
oh lord
talking about far fetched emoticons ... why not just :elvis: then
@SecondRikudo never thought about it that way; $iif was indeed a ternary
12:21
and ?: as a binary is essentially a coalesce
@MoshMage VB6 and a lot of SQL dialects have similar constructs, but there is an important difference. In PHP: condition ? func_with_side_effects() : other_func_with_side_effects() - only the matching func will be executed. Anything that frames it as a function with arguments iif(condition, func_with_side_effects(), other_func_with_side_effects()) - both functions will be executed, so both sets of side effects will always happen
I prefer JavaScript's || though, but I guess it will do :)
@Jack doesn't or do the same thing in PHP?
@DaveRandom It doesn't always return a bool
@Jack *the same thing as || in JS
12:25
ehh yes :)
what i meant is that i like the semantics of || better in JS :)
why, of course
in php or will cast the return value to bool
or should I say ||
($x = 0) or 1
@Jack oh right, precedence
12:27
the intricate interview question bundle
yeh and if you bracket it, you get a bool
@PHP Y U NO MAEK SENSE?!?!?!?
Well, it makes sense I guess, but it's basically useless for anything apart from the nightmarish or die() construct
static const void *videoSourceChangeObservationContext = &videoSourceChangeObservationContext;
gotta love obj-c haha
@Jack No, actually. I don't.
@Jack what the hell.
@Jack ummm....
12:29
Before you all think I've lost it ... that's how you define a unique void * context you can use for key-value observing :)
It's a pointer pointing to itself.
That is literally insane
That sums up KVO alright
Once you enter the void, there is nothing but more void
hehe
voice over ID?
xD
12:31
The black hole pointer construct, we haz it!
@DaveRandom actually, you can't say if it's "more void" (or less). It's just void :p
static const void *spoon = &spoon; /* there is no spoon */
3
conceptually, can you say there's a difference between null and void?
@Jack I demand you put that ^ in the codebase somewhere
@DaveRandom It gets worse; to add an observer you need this hideous message: addObserver:forKeyPath:options:context:
A four argument message ... is just awful.
12:34
@JoeGreen Yes, NULL is an explicit absence of something, void is a space where something could be
@Jack You forgot the ]]]]]]]]]]]]]]]]
@DaveRandom Nah, there's only one pair for that one heh
I was thinking of whether I should present my kid with the axiom that "the monsters under your bed aren't there the moment you look."
Actually that's better
I always thought of void as an infinitesimally small space
12:37
^ wrong thought
I see
so null and void are essentially the same then
given that a variable is also just a space
or a point in a space
void = can be anything, null = definitely nothing ...
why do we say a functino returns void if it doesn't return a value?
@Jack huh?
hmm?
12:40
no, void is void = can't use the return value
that's the point of putting void there
the fact that php always returns null is a detail of that
but void means DO NOT USE MY RETURN VALUE DAMNIT!
perhaps i should have used void* = can be anything then lol
@Ocramius void != void*
They probably should have chosen another keyword
12:42
oh, that indeed :P
in obj-c they have this concept of id .. which seems to be the embodiment of void * .. not sure though, i just use it :)
static fuckknows *wtfIsThis = (fuckknows*)thing;
@DaveRandom remind me never to introduce you to my children :D
@AlmaDo Do you even have kids? :)
The awesome thing about the cpp is you could actually do that as well
12:45
huh.. no. and that's bad great?
@AlmaDo It could be.
I guess no way
for the intermission of 6vs7 we will be showing the pnpng->master debate.
wtf is pnpng?
php-nogood
12:50
eh..
nah, kidding .. it's new generation i believe.
since when is PHP any good?
hm.. "php is good" hasn't good abbreviation ..
FIG .,, oh shit
12:54
Lester is such a fucking bell end.
Don't you just love that guy to bitch bits?
Someone used the word Singleton here.
Not it a negative light though :(
> but my own concern as always is the effect on extensions I use.
I built a static singleton servicelocator the other day
8
I felt the earth trembling
FUCK OFF AND SORT THEM OUT THEN. Oh that's right, you never contribute anything apart from question marks.
@Ocramius That deserves a shiny star
12:57
We should probably visit Lester and beat him up with question marks.
@Ocramius lol
Jun 17 at 9:37, by DaveRandom
Also I swear that I am going to hunt Lester down and take the ? key off all of his keyboards.
lol
@Jack Dressed as The Riddler
Lester is The Riddler's Apprentice.
12:59
@Ocramius This disgusts me

« first day (1375 days earlier)      last day (3799 days later) »