« first day (1074 days earlier)      last day (3874 days later) » 

12:03 PM
Is there any downside to enabling query caching in mysql ?
 
@DamienOvereem it's not free
if you have all unique queries - it won't bring any good
 
Thats understandable. And as far as i can tell there are no downsides to enabling it..
just trying to make sure before I toss it on in one of my production environments
Because of a migration I kept it off so performance issues in the codebase would come to light.. but now I am at the point where we just want it to be as fast as possible.
 
"Because of a migration I kept it off so performance issues in the codebase would come to light" --- that's sparta mode
just use slow query log, that would be enough
 
is it just me or youtube is broken ?
 
@tereško you
 
12:14 PM
the last update in my subscription feed is more then 24h old
that doesn't seem legit
 
@zerkms No.. it's marketing :) Now i get to do an update which makes everybody extermely happy for a few weeks, which allows me to do fun stuff for a while :)
 
Is this bad database structure? i.imgur.com/dLAIhLZ.png
 
@JoelKidd it is excel
 
Yes but I'll be putting it into MySQL database
I need lots of "stops"
 
what is it for?
 
12:18 PM
And each one has 3 values
 
how about using spatial data types?
 
@JoelKidd postgis.net
 
The thing is, I don't know how many stops there are
It varies
So I can't have like STOP 1, STOP 2, STOP 3 etc in columns
I just need to know whether that screenshot looks messy/bad db or not
I can just parse it when I retrieve it can't I? Like push each [] into an array
 
it doesn't look like database to begin with
 
Ok let me explain myself better sorry
 
12:20 PM
it's enough
 
Basically, I need to retrieve all of the stops by passing an ID
 
to tell it's bad
 
read about the thing that I LINKED you to, @JoelKidd
 
@tereško there is a spatial extension for mysql available as well
 
So "Select Stops WHERE ID = ?" ? = URL param
 
12:20 PM
(haven't used it though)
 
I don't see how spatial extensions are necessary
 
ok .. then do without
 
so you won't perform any search by coordinates?
 
here are some hints: stops will have an order, and you cannot use primary key for that
 
No, literally just via an ID
I need to pull all of the stops and to get the stops I'd pass the ID
that kinda make sense?
 
12:22 PM
I need some leave because I am really burnt out...
 
s/hackers/script kiddies
 
Would that be a more appropriate setup?
 
no
 
Please share your knowledge :3
I'm unsure of the best way
 
12:24 PM
@JoelKidd , please , read this book: pragprog.com/book/bksqla/sql-antipatterns
assuming that you already know the basics of SQL
 
I'll order but I'm in a rush and need to do this fast
 
Paper Book ($9.95)
eBook ($25.00)
nice pricing
 
Just need a simple solution
 
@JoelKidd then just serialize everything in a single json
and put it in a BLOB
 
@zerkms supply and demand
 
12:25 PM
@zerkms Legend
That makes sense
I'll do some research into these blobs :)
Im very familiar with JSON so that sounds like a good solution, cheers
 
That way next guy would know you was crazy, not just didn't have enough experience
 
@zerkms you do know that it is a terrible idea
yes ?
 
Oh
 
@zerkms yo dawg, I heard you like NoSQL, so I've put some JSON in your SQL so you can NoSQL while you SQL
 
@tereško see the explanation ^ ^ ^ ^
 
12:25 PM
lol ok maybe not then
 
oh ... right
 
3
Q: Storing multiple values for a single field in a database

Some BodySuppose i have a table with 3 fields Person_id, Name and address. Now the problem is that a person can have multiple addresses. and the principle of atomic values says that data should be atomic. So then how am i suppose to store multiple addresses for a single person ?

That looks like it may help me
Just reading it now
 
@JoelKidd , get that book. It should be purchasable at any local torrent site.
 
Haha
I will :)
Foreign keys seems the way to go
 
and if you like it, buy it and recommend to others ... it's written by one of regulars here
 
12:27 PM
Until you accidentally delete something.
 
Anything I ever pirate I buy if I like
That goes for everything, otherwise I feel like an arsehole x)
 
Which regular wrote this?
 
@Fabien Bill Karwin
 
Anonymous
what book.
 
Anonymous
I'm interested
 
12:29 PM
@Simon_eQ Holy Bible
 
Is that his alias in here too?
 
Interested in that too.. if I like the guy, i might buy his book ;p
 
For the record the answer I was looking for was a "many-to-many link table"
 
12:30 PM
What happens if I have a single -> many -> many more :P
 
Anonymous
Oh, Antipaterns .. I'm not sure, if I am there yet.
 
Anonymous
NOPE I'm not!
 
@JoelKidd Actually after the last discussion here I've had with you - I thought you already know such a basic things
 
I think in future "==" should be same thing as "==="
 
nope
php is not a strictly typed language
 
12:35 PM
@zerkms I know a large range of languages, some in more detail than others, I only learn what I need to carry out different jobs
@zerkms Eg if I might need a lot more of SQL than I first though, so now I will spend some more time expanding knowledge
 
@JoelKidd I prefer the opposite - I read a lot about things I don't even work with
 
Lots of people would vote against that way of learning but it suits me
Yeah sure
I appreciate that, lots of people tell me that
 
"Eg if I might need a lot more of SQL than I first though, so now I will spend some more time expanding knowledge" -- that means the result will be not as cool as it could be
 
Yep that's true, but thankfully my job allows me to fit work in that way
 
the code written while you learn normally should be sent to bin
(personal opinion)
 
12:37 PM
Again, a lot of programmers would shoot me, but I learn what I need to get by/complete a job
 
Also, I'd say many-to-many relationship is an advanced topic/query, not a basic one
 
it's extremely basic
 
"many-to-many relationship is an advanced topic" o_O
 
12:41 PM
advanced - if you implemented scalable fault-tolerant solution with multiple masters
 
When you go into that much detail it is
@zerkms Yes
 
Anonymous
ehh, I thought it was
 
I think the concept isn't advance,d but putting it into practise is
For me anyway
 
it's just having one more table
nothing more
 
Yes, exactly, the concept is simple :P
I suppose saying many to many relationship is advanced is wrong
Because it's just a relationship
But I think making the queries/setting up a many-t-many db isn't as easy as it sounds
 
12:44 PM
it is just another INNER JOIN
 
@JoelKidd the same guy thinks that getters and setters in php are "advanced topic"
 
I don't think getters and setters are an advanced topic
That's OOP
 
@JoelKidd correct, the concept isn't
 
Nothing to do with it
 
but putting it into practise... :-P
 
12:44 PM
@zerkms Yes lol :P
 
))
 
hmm ... I think I will have to remove Battlestar Galactica from my torrent queue .. it's starting to look like some psuedo-religious political drama
at least it tries to, but result is flat & boring
 
Anonymous
Religion ain't so bad.
 
Anonymous
How about you give it a try
 
Anonymous
like I did with that anime movie
 
Anonymous
12:52 PM
Just one episode!
 
var_dump((object) 'wut?');
class stdClass#1 (1) {
  public $scalar =>
  string(4) "wut?"
}
PHP is like a guy, who despite lacking enough information to render a sound conclusion, tries to pretend he understands entirely.
 
@Simon_eQ Give MLP a try. :D
 
Hi , I'm unable to understand fcomerce to be create in Facebook, via App, Can you guys provide any link to sort out the things @Simon_eQ
 
Some random application architecture question: Action -> Service -> Repository -> DataContext (holding array of DomainModels read from datasource) Is this kind of structure acceptable? If it is, is it missing some abstraction layers?
 
@Simon_eQ yeah, but there are so many of them and the three most popular ones seem really childish
ya know: one piece, bleach and naruto
 
1:02 PM
Buddhism seems alright.
 
I have another quick question, if I have data that would take up lots of columns like this: i.imgur.com/4vRmKrw.png
Is it bad to use hundreds of columns if theres no fixed amount of data?
 
Judeo-Christian Most belief systems don't work for me. I'm too much a relativist.
 
In short, is it bad to use lots of columns?
 
yo
 
1:08 PM
@ircmaxell morning
 
@Gordon About the RFC Draft, I think the C++ notation is far less confusing. Why didn't you purpose that?
Also, Hello Everyone. :)
 
@omeid pick one reason: a) because nothing good ever came out of C++ or b) I am unaware of it
 
@Gordon Haha, C++ isn't that bad. There is the example. :)
class Point {
    private $x, $y;
    public function __construct($someObj, $varX, $varY) : x($varX), y($y) {
    // Do stuff with $someObj Maybe, or it could be even initialized like other properties, $x, $y.
  }
}
 
Im courious for this response: stackoverflow.com/questions/18982484/… tried to solve it too but got the same error :P
 
@Duikboot Properly an encoding issue.
The URL has accents.
 
1:18 PM
@omeid The point of the syntax is to type less and duplicate less
The C++ syntax doesn't do that. It exists for wholly different reasons
 
That is reasonable. Perhaps I should have paid read the Draft more carefully.
But I still think this implicate method is way too automagical.
 
In particular, the C++ syntax is there to initialize const members, references, base classes and members without default ctors. None of which is really a concern for PHP ;)
 
@Gordon , what about instead of altering __construct() you alter the definition of class variables ?
keep in mind that the whole thing has to be somewhat compatible with varadics
 
ARG, why can't PHP support callback dereferencing
 
@tereško what would be the issue there? can write __construct($this->x, $this->y, $this->z, ...$this->rest); if ya like
 
1:25 PM
@NikiC you mean afternoon... It's 15:25
 
@ircmaxell it's always morning
 
yeah yeah yeah
 
@ircmaxell which one?
 
I got curry and curryLeft working :-d
@NikiC curryLeft($function)(3)(5)
 
curry as in actual curry or partial application?
 
1:26 PM
actual curry
 
ah, actual curry
 
maybe I should make rice today
 
it's fragile, requires reflection or an optional nargs param
but works
 
@tereško If you alter the class definition, then how would you define the order of parameters and how about handling other objects that you could be just disposing right after constructor is done?
 
@ircmaxell code?
wait, curryLeft means that you append the args to the end?
if so, that's seriously ugly ... ^^
and ambiguous
 
1:31 PM
@omeid not sure this is easier
 
@Gordon Yeah, now that I think of it, it would be just typing at least as much if not more. Scratch that idea.
 
daux.io cooll
 
Good morning everyone
 
@Gordon just a notice to gist.github.com/gooh/6673723/… … in interfaces, parent classes, you still can have a normal signature; the only thing what varies is the variable name (which is already allowed to change). So don't see the problem?
 
Functions to "extend" core, such as array_*, should live in the global namespace, correct?
 
1:40 PM
@bwoebi the problem is that putting function fn($this->foo) into an interface definition requires my concrete implementation to have a property foo which an interface should not require me to have at all.
 
@Gordon why would that be allowed in an interface?
 
The implementation details are bleeding into the interface, no?
 
@NikiC if we'd extend the automatic field assignment to the entire class scope we'd have to think about how to handle this in interfaces, wouldn't we?
 
@NikiC yes, and yes
 
@Gordon no, not at all
 
1:42 PM
I implemented curry and curryLeft
 
@DanLugg right.
 
interfaces just don't allow it, because it's totally stupid to have that in interfaces...
 
@Gordon huh? In an interface, you still write a normal function fn($foo) and in the class implementing it, we write function ($this->foo) … what's the problem?
 
@bwoebi But in the first example, there's no implicit requirement that $foo be auto-assigned to the property.
 
curry($foo)(3)(5)(7) == $foo(3, 5, 7), and curryLeft($foo)(3)(5)(7) == $foo(7, 5, 3)
 
1:43 PM
@NikiC it is totally stupid. that's my point actually.
 
@Gordon So, I think we're arguing about how much we all agree :D
 
This would all be solved with accessor/mutators ;-)
 
@DanLugg the interface shouldn't define any behaviour of the function???
 
Wait, maybe I jumped in here wrong; is the problem of interfaces defining a constructor, or of the auto-constructor-assignment leaking implementation details to interfaces?
 
@NikiC since PHP doesn't prevent ctors in an interface, should the RFC contain a note that using $this->foo in an interface will raise an error?
 
1:46 PM
 
@Gordon yeah. And same for abstract functions ;)
 
@DanLugg both. ctors dont belong in an interface either
 
Exactly. Perhaps interface constructors should simply not allow auto-assignment.
 
@Duikboot thanks
 
E_DONT_DO_THAT_IN_AN_INTERFACE_YOU_LEAKY_ARSE
2
 
1:52 PM
@DanLugg there's an _OR_ABSTRACT_METHOD missing.
 
@NikiC on what basis?
 
Anonymous
> Long to be professional.
 
Anonymous
that is answer question-answer imo
 
Anonymous
You answered his question, by giving me another question ...: )
 
@Duikboot E_AWESOME_OVERFLOW thrown by @gordon
@Gordon variable names don't matter in an interface
 
1:58 PM
:D
 
@Simon_eQ that's on purpose. Part of becoming a professional is to find out what it means to be one. I can't speak for the others but even after my ten+ years I am still finding out.
 
Man, coming your beard is such a nice feeling.
 
@ircmaxell yes, but they shouldn't contain $this->foo
 
How do you guys test registration/ login account approval mails?
 
@Gordon fair, but you can still do it later
 
1:59 PM
@ircmaxell yes
 
I always use 10minutemail.com but isn't there a better way to do that?
( I don't want to remove everytime my email from the database. )
 

« first day (1074 days earlier)      last day (3874 days later) »