« first day (1040 days earlier)      last day (3907 days later) » 

9:00 AM
@Sparrow Depends whether you're a designer, developer or both
 
@AlmaDoMundo for example, reflection-based APIs use a lot of static methods because the code itself is actually static and you can't change that
 
@SweetieBelle The first question to ask is how much money they have :)
 
@SweetieBelle both ^^
 
but again, that diverges from OOP
 
@Jack Rarely relevant until you know what the specification is :P
 
9:01 AM
no problem with money I am in the beginning
 
@Gordon - I'm instantiating my object from a list of parameters (each of them could have any type). Count of parameters is unknown. Then, I want to have a way to create my object from an array of parameters. I can not use __construct here, obviously - so how do i do that without static method?
 
@SweetieBelle It's relevant if the amount < $2k,- :)
 
@AlmaDoMundo why not?
 
there's a way to create object with empty list of data, the use setter or whatever to set data, but..
 
@Jack I'm quite happy to do a site for less than $2k, if it takes less than 50 hours. :)
@Sparrow Can't comment much on the design side -- ask a designer. :P As for the development side, you'll need to know all the functionality they expect from the site, what version of PHP they're running on their server (assuming you're using PHP) and timescale.
I usually hire a designer if my client doesn't have one.
 
9:03 AM
@Gordon in __construct I'm expecting any count of parameters (grabbing by func_get_args) and each could have any type. If I'm getting array with data - how do I know is it a list of parameters or a single parameter-array ?
 
@DaveRandom yo?
@DaveRandom @DaveRandom @DaveRandom @DaveRandom @DaveRandom @DaveRandom @DaveRandom @DaveRandom @DaveRandom @DaveRandom @DaveRandom @DaveRandom @DaveRandom
 
@PeeHaa Pesky Dutchie
 
:D
 
I've solved that via static method createFromArray, which will accept array as a parameter and then deal with it
 
@SweetieBelle I think the website that I am going to work on does not care much about programming. So I should ask a designer ^^
 
9:04 AM
s-s-s-s-super ping!
 
@PeeHaa SO just died on me
 
:P
 
@Sparrow I'd imagine you'll want to see their existing branding, so that the site fits into it well.
 
@DaveRandom Quick DNS question
 
'sup?
Go on
 
9:05 AM
i.e. if all their brochures are white, don't do a black and yellow site.
 
I have a DNS a record with @ prefix
Is that root domain?
i.e. mydomain.com?
 
@PeeHaa @ is root
 
That looks like apex
 
tnx
 
@AlmaDoMundo you could check what's in the array obviously. But I agree that's not the best option. A static method createFromArray would be okay here. However, I'd say the real problem to solve is why the ctor accepts random arguments in the first place.
 
9:06 AM
@Gordon - check array for what? it can contain any data
 
@AlmaDoMundo that's the actual problem to solve. it hints at a design smell
 
(sec 5.1)
 
looks like you receive a lot the same numbers
everytime
 
> A free standing @ is used to denote the current origin.
 
9:07 AM
@DaveRandom That looks a bit too much like some rfc you just linked there
 
@SweetieBelle yeah sure , I got now information about it that they need it for traveling company that gives the user the ability to check if he can travel at specific times ( programming ) , so what do you think and how much should I ask for I mean money.
 
@DaveRandom tnx :)
 
@Gordon - well, as I've said: if my data could be arrays with any data - there's no clear way to separate one case from another. And the normal way - is to create another method. Since we are talking about instantiation, this should be static method cause object context not exists before it's creation
 
@Duikboot The distribution is fairly random, that's not the issue. The issue is that when you use something like rand, it seeds from a non-random source. With a long enough chain of results, you can determine the seed.
 
@Duikboot That's expected behavior.
 
9:09 AM
What do you mean with the seed? The base where the random number is calculated on?
 
@AlmaDoMundo the purpose of ctor arguments is to pass dependencies into the object that are required to initialize the object into a valid state. Something is wrong with your object when it requires any data.
 
@Gordon I know a way to avoid static method, however: create non-static method setData (it will accept array) and - instantiate object with empty data via constructor, then apply setData to instance. But that's seems to be ugly
 
@Jack Yeh I'm not sure why but for some reason I have both the text and HTML docs bookmarked, that was just the first button I found, I've just deleted it
 
@AlmaDoMundo Another option would be to use a dedicated Factory
 
9:11 AM
@Gordon in my case that is an implementation of math set - i.e. it should accept any data simply by definition
 
@AlmaDoMundo if it's a Set then I don't understand why you need two different ctors
can you share that code?
 
@Gordon as i've said: I want to have both ways to define it: either through list of items, passed to it (one by one via comma), or through array of items
 
@AlmaDoMundo and that's the design smell :)
 
i.e. that is how it's now:
$rObj = new Set(['foo'=>'bar'], false, 64);
$rObj = Set::createFromArray([['foo'=>'bar'], false, 64]);
why is it a design smell?
 
9:17 AM
@AlmaDoMundo ah. no, that is okay. One could argue, you don't need to provide both ways though.
 
may be. In general - I know that in my case I can do it like:
$rObj = (new Set())->setData(['foo'=>'bar'], false, 64]);
so you're right in this case - we can avoid static method
but.. using that - it's more simpler
 
@Duikboot Yes, the seed is the base value from which the random number is derived.
 
@AlmaDoMundo Well, like I said ctors set objects into a valid state. The Set will be valid without the data. It might be more simpler but technically it's not needed to fulfill the ctors task
 
yep. Set is valid without data. May be there will be problems if such object will not valid without data
 
$set = new Set; $set[] = 42; $set->addFromArray([1,2,3,4]);
 
9:24 AM
@AlmaDoMundo codepad.org/XQoalE4w ?
 
you mean that it should implement ArrayAccess?
 
@AlmaDoMundo could not should
 
I found a good random number generator! Take a windows user, force him on VIM, record keystrokes.
5
 
@Ocramius that's for hashes and passwords
 
@Gordon you can always convert to INT
 
9:27 AM
@DaveRandom - what is bool and int ?
 
I don't know, whatever your 2nd/3rd args are
 
@DaveRandom variadic arguments
 
I can not understand that since I can have any count of items in set (as @Gordon said, it could be empty)
but I know that I can use fabric for creation, yes
 
hmmm the cv ring is weak today :(
 
9:30 AM
@DaveRandom he's doing this:
public function __construct($args)
{
    foreach (func_get_args() as $arg) {
        $this->addToSet($arg);
    }
}
 
ctrl + k @Gordon
:P
 
Ahh, I misunderstood what the application was in that case. Either way, the point is use a factory object with multiple create*() methods and and hydrate the created object as appropriate depending on which method was called
 
POWAH ABUSE!
 
;)
 
:D
 
9:32 AM
@AlmaDoMundo The benefit of using a factory here is that it cleanly separates the responsibility to create that object in various ways from the actual responsibility of the Set itself being a Set.
 
@DaveRandom , yes, may be so. I'm hesitating when using fabric since I'm not sure in some cases about patterns (may be I have not enough experience yet) - and if I'm not sure and get get an answer via reading manuals and samples - I'm not using a pattern :p
 
Also you can easily adjust your code to use a FooSet instead of just a Set by simply changing the factory
 
but thanks, I'll think about reorganization of my code's structure
 
@AlmaDoMundo It's also somewhat of a choice between providing a MinimalInterface or a HumaneInterface. If you already provide construction from variadic arguments and array, I'd also expect the Set to allow for adding variadic arguments in addition to arrays in addition to Sets.
 
@Gordon - so it does now
 
9:35 AM
@AlmaDoMundo just to make sure: having a static factory method is not wrong. It's just not strictly necessary.
 
is there any way to get new records (Insert,delete,update) into a sql file within a time frame ?
 
@à° _à°  You mean which one were adjusted within a specific time frame? Only if your server is configured to log that information (or you have a column in the table(s) that logs that information)
 
I wish MS would release IE11 for Linux :(
 
@AlmaDoMundo that's convenient but also convoluted :)
 
@Gordon - yes, and that was my point - i.e. I agree that I can do things without static factory method (and in 99% cases I can avoid using static methods/properties at all). I just don't know why I should avoid them. You mentioned unit-testing. But - shame on me - I'm not using that...
 
9:38 AM
@DaveRandom can we maintain a log file ? or does sever do that ?
 
@SweetieBelle You're still on the being-in-love-with-IE11 train? Get a room :-P
 
@à° _à°  SELECT * FROM some_table WHERE last_updated ... then maintain a last_updated column when you edit data.
@DaveRandom I'm a web dev, I need to be able to test IE
 
@à° _à°  Which RDBMS are you using?
 
Right now I have Windows in a VM just to test IE
 
@DaveRandom mysql
 
9:39 AM
wow.. I don't have Windows :p
 
@AlmaDoMundo the problem with statics in unit-testing is that they introduce strong coupling and that's hard to replace the dependency with a mock then. But in the case of the Set it doesnt matter because new Set introduces the same coupling as `Set::createFromArray. Strong coupling in general is bad because it makes your code harder to change so even when not doing unit-testing, it will have an impact.
 
@AlmaDoMundo How do you test IE10?
 
@SweetieBelle I'm not testing IE :p
 
@AlmaDoMundo Remind me never to hire you :P
 
@SweetieBelle and I'm not testing FF or Opera :p
 
9:40 AM
IE is ~28% of our hits at work, and about 17% of hits on my personal pet project.
IE6 is 5% on our work site.
 
@à° _à°  dev.mysql.com/doc/refman/5.1/en/query-log.html - that's enabled you could extract the data from there. But in reality it's not likely to be enabled in production (nor should it be) and it's probably not what you want anyway. Maintaining a column in the DB that tracks it is probably a better solution, what's the use case?
@SweetieBelle That's just you testing it in IE6 :-P
 
I don't test Opera, its sub-1% of our hits.
@DaveRandom I wish it were :P I don't think I've made that many IE6 hits.
I actually don't work on the web frontend any more, but IE6 is still on our MUST SUPPORT list, unlike Firefox 3.6 which fell off years ago.
 
@DaveRandom how i activate that log ? and why isn't good ?
 
@DaveRandom I have ignored him, but I think you are helping him replicating dbs. If so it's hopeless
 
What was IE6's %?
 
9:43 AM
@AlmaDoMundo I build in FF then test in IE/Chrome
@Fabien At work, just over 5%.
 
Damn.
 
We serve a lot of customers in south and east Europe, IE6 is still rampant here.
 
@à° _à°  Well how to activate is documented/linked from that manual page I just linked, but it's almost certainly a bad plan because it will eat disk space and log a lot of info you don't need, as well as being a performance hit on MySQL itself.
@PeeHaa I have yet to find out, tiny avatar guns at the ready though
 
wtf
 
@SweetieBelle I blame @webarto
 
9:45 AM
What can cause the problem that the salt is not being used?
return md5(sha1($pass).$config->salt);
 
If Microsoft really want to kill IE6 like they say they do, why don't they push a SP to XP users with IE7? :/
 
Why is IE6 rampant there though?
 
@Fabien Lots of Windows XP.
 
9:45 AM
The salt exists etc but when It saves the password it is not using the $config->salt; variable... only md5 and $pass
I know but I have t solve this for a project
 
@Duikboot That is PHP telling you you are doing it wrong
 
@SweetieBelle I guess the few people still stuck with IE are companies
 
I know :-) in my new project's I am not using that method anymore but i just wanted to know why it skips the $config->salt; part... ;/
 
@Gordon And Chinese people with their government "sponsored" browsers
 
@Gordon Could be though we don't primarily supply to business, we're an end user service.
@PeeHaa Reason China uses IE6 isn't government, it's that most PCs in China are terrible and still run W98/ME.
 
9:47 AM
@SweetieBelle Uhhhm not really
I think
 
@PeeHaa I went to cyber cafes over there a couple of years ago and saw a lot of WME/W98 boxes. It's pretty ridiculous.
 
If that is the only reason they would use vanilla IE instead of the government great firewall and monitoring versions of IE
 
@SweetieBelle btw, they did that to end users: blogs.windows.com/ie/b/ie/archive/2011/12/15/…
 
AFAIK they use vanilla IE.
 
@SweetieBelle nope they don't
 
9:49 AM
@Gordon Oh, hmm, didn't know that.
 
What about things like CSS PIE to deal with IE6?
 
@SweetieBelle Many of them use an "enhanced" version of IE
 
We don't get many hits from China, sub-0.1% IIRC
 
@DaveRandom That made me look like a peasant.
 
@Fabien Only thing we can really do is support it as best we can.
 
9:51 AM
My POST request wouldn't get more than 5k text in a specified param. How could I get the "text weight" of a string ?
 
Hello All
 
@Fabien We have a policy that it has to work in IE6, but it's not like we try to hack it to look how it looks on newer browsers.
 
Ah fair enough. Viability
 
@Alucard strlen
 
I'm the same when I have freedom, as much CSS3 as possible, if you want a better looking experience, upgrade.
 
9:52 AM
> A payment was maid from you account in a foreign currency or outside your agreed circle of geographic location. As a result we have cancelled the payment suspended all transactions on your account for 5 working days as an anti-fraud measure. If you initiated the transaction and would like to progress it, please contact us so we can authorise it.
FUCK YOU MBNA
 
@Alucard What do you mean by "text weight"? Surely not the length?
 
@SweetieBelle one problem is that if your company decided to "optimize" for IE6, they potentially need to update a lot more than just the browser. Just imagine you do a roll out to hundreds of users and all of a sudden your intranet apps can no longer be used.
 
I think the other issue with China/IE6 is that a lot of Chinese use pirated WXP, so they don't run Windows update.
 
@DaveRandom lulz
 
also lol @ wrong kind of made
 
9:53 AM
@Gordon Makes sense but you could always install FF on one PC and test the Intranet
 
@DaveRandom Also "from you account" lol
 
or IE10, or whatever you're planning to up to
 
Hmm, I smell phishing
But at the same time, I did just do that, pretty big coincidence if so...
@webarto You are, aren't you? :-P
 
If it's legit I would highly recommend them to hire someone older than 12 years old to maintain their system.
 
@DaveRandom 'maid' and 'you account' :D
 
9:56 AM
@SweetieBelle well, they will likely use some sort of tool to manage desktops anyway. Windows Server Update Services or something like that. So they can select which machines get what. But that's not the point. If they realize the crucial intranet apps wont work, they have to update these apps. And that will cost them so deferring the update might be a viable option then.
 
@SweetieBelle Also presumable missing and between payment and suspended
 
@DaveRandom Yes, 'and' or comma.
Wait no
 
progress == process maybe?
 
Comma wouldn't work there
 
9:57 AM
neh that may be fine
 
I think 'progress' is fine.
 
damn it, look like it's genuine, I just logged into my account (from a different machine, no key logging for me) and there's a big fat banner on my account home :-(
No Elephpants until next week then, booo
 
@DaveRandom spoofed site man
 
You should probably advise them that their emails are being sent by a 10 year old child.
 
You should probably advise them that their emails are being sent by a 10 year old idiot.
FTFY
 

« first day (1040 days earlier)      last day (3907 days later) »