« first day (205 days earlier)      last day (4970 days later) » 

15:07
Hello folks
hola
shalom
hi
hello
buenos dias
Whoa! All are from Gravatar multi-language greeting? :)
lol no
i just know how to type those
idk what gravatar is
ha
@Robik haha i have that shirt
Gravatar is a place where all stolen and crappy-looking avatars are stored
^_^ well i have your avatar on a w00t shirt hehe
15:16
You mean my donut avatar?
@Robik yesssssss. its a w00t shirt
i have that shirt, its awesome ^_^
Whoa, didn't know. I've just stole it from somebody...
^ ^
@Robik haha. it is an awsome one.
Avatar or shirt?
@Robik ehhhh i think more shirt, ur avatar loses the context of the Donut Panic!
15:20
Didn't know about the second donut.
@Robik thats the funny part ^_^
And drastic
@Robik drastic?
Brutal
@Robik ehhh they have a lemon one too
15:21
Really?
have that one too lol
Phew, my donut is cooler than some lemons
:)
@Robik DONUT PANIC!
hehe it goes with my 42 and my avatar
No, it's donut but panic is on donut's face expression
:-D
15:23
(:
hehe u see my avatar?
hehe
He he he
Nice one
must be a way to combine the 2 lol
Yes, a donut with panic on his face holding a flag with "Don't panic"
@Robik hehe holding the hitchikers guide :-p
15:26
Or knife
@Robik ehhh the guide sticks :-p
maybe a few daleks behind that
lol
too much sci fi for meee
You mean the lightsaber?
whered u geta lightsaber?
Star Wars?
lol
and dalek = doctor who, and dont panic and the guide is the hitchikers guide
15:28
Can someone who uses ORM tell me why is it needed? Why not use SQL? Why build another layer?
how many for sci references can we stick in one tiny avatar?
@Neal 1/0
@Robik thats DNE. (i think) or is that infinity?
Its Exception
@Robik thought so
hmmm
ok. so a donut holding a sonic screwdriver in one hand, a light saber in the other, towel over its shoulder running away from a bunch of angry vulcans?
15:34
You've forgot about the shoes
@Robik ahhhh, what is a scfi shoe?
Flying shoes with M9 Trequalizer?
@Robik ok now we are getting into games now? lets stay in the real world :-p
Tek
Tek
@rickchristie I heard from someone ORMs hurt in big projects.
Though they should be fine for small or mid-sized ones
@Neal Weapons exists in our world too
Tek
Tek
15:39
@rickchristie blog.objectmentor.com/articles/2007/11/02/… It is this 1:1 correspondence that bothers me. Indeed, it bothers me about all ORM tools. Why? Because this mapping presumes that tables and objects are isomorphic.
@Tek - why does it hurt in big projects?
I dunno, I read about 'object-relational impedance mismatch' and I still don't understand, I might have to read more
@Robik hmmmm does it now? ok, but when i say real world i mean real as in fake :-p, but not as in games
Leave my donut alone!
:)
Tek
Tek
@rickchristie Read the whole article
Tek
Tek
15:41
Specially missed opportunity section, I think that's his point.
@Robik mmmmm donuts
And cookies
Anonymous
Funny this.. was just coming on to ask about good (yet light) ORM's
@Robik and muffins!
Anonymous
any recommendations ?
15:43
And Pies
Tek
Tek
@SkippyChalmers I hear good things about Doctrine. Not sure about 'light' though.
112
Q: Good PHP ORM Library?

sgibbonsDoes anyone know of a good object-relational-mapping library for PHP? I know of PDO/ADO, but they seem to only provide abstraction of differences between database vendors not an actual mapping between the domain model and the relational model. I'm looking for a PHP library that functions similarl...

@Robik what type?
Dunno, just pies
@Robik meat pies or dessert pies?
Anonymous
hmm cheers
15:45
Pies
@SkippyChalmers - why do you need it?
Anonymous
too many custom model methods
Anonymous
using CI
Anonymous
to get the same data in a million different ways
Anonymous
and its all relational... with meta tables and the like.
Anonymous
15:46
(@rickchristie)
@SkippyChalmers - what do you mean by too many custom model methods?
do you think that using ORM will solve your problem?
Anonymous
yes.
I want to know the problems that ORM solves
Anonymous
i mean exactly what i said... too many model methods that do the same thing, only slightly differently.
why do you need that many methods if they are doing the same thing?
excuse the curiosity :)
Anonymous
15:49
the plan is... to reduce maintenance on the sql
Anonymous
because they're doing different things, but very similar
Anonymous
no problem...
can you give me an example? a case?
Anonymous
no. sorry! you'll have to use your imagination...
Anonymous
15:51
well i can try
@ircmaxell .. streets back, all right!!
Anonymous
@rickchristie get books by author asc with a red cover, in the astrology department.
@ircmaxell hehe you should see the discussion here from like 10 mins ago lol. hehe donuts
Anonymous
@rickchristie get books by author as with a red cover in the astrology department with purple lettering and author being born in the 1800's
15:52
Hello @ircmaxell
Anonymous
there. obvious cat is obvious ;)
@ircmaxell lol longer than 10 mins ago
i have no sense of time
Anonymous
@rickchristie brb.
SELECT
    book.id, book.title, book.author
FROM
    book, author
WHERE
    book.cover = 'RED' AND
    book.department = 'ASTROLOGY' AND
    YEAR(author.birth_date) >= 1800 AND
    YEAR(author.birth_date) < 1900 AND
    book.author_id = author.id
IIRC and correct me if I'm wrong
I don't see what's wrong with that
how would you do it in ORM?
15:57
Except for the fact that the query would be a full-table-scan due to the function on the birth_date column
ah well, it can always be optimized, but the point being, using ORM doesn't solve it either
right
I want to know what exactly ORM is trying to solve
I've read about 'object relational impedance mismatch', I think I ought to read more
but activerecord is so cool
@ircmaxell - what do you think about ORM? stackoverflow.com/questions/5358131/…
16:00
stop that blasphemy , @rickchristie
I mean, correct me if I'm wrong, but if we want to decouple the application with database type, isn't SQL a standard? Doesn't database abstraction layer like PDO solves that already?
who need sql
you just wrote php and it works
what is pdo ?
posted on May 09, 2011

In a new post to his blog Chris Roane looks at a method for some advanced form validation using both server-side and client-side validation (with the help of jQuery). Last year I wrote an article in how to implement basic validation for a form with PHP. I decided to re-look at this and improve what I did in that article. This time we are going to make a more advanced PHP form that is more r

wait, PDO isn't database abstraction layer
but the point is still there
agree with that
16:03
@ircmaxell - agree on the answer on SO?
@rickchristie people are lazy
@rickchristie That's a fair view on it. I prefer data mappers. A set of classes that map objects to SQL and back. SO you can ask $books = $mapper->getAllBooks($conditions);
@teresko - :) - but that's not the reason that they tell, the use technical jargon and stuff, and I actually read an answer to that sort of question in a form like 'you don't understand the need for ORM, then have never coded in OOP before'
The problem is that a ORM tries to blur the difference between a relational set-theory engine (such as a RDBMS) with a non-relational hierarchical model. A lot is lost in the translation...
@ircmaxell - well I like that approach too, you call methods and it uses SQL to get the data, I'm going to do read on data mapper
16:07
@rickchristie Right, and the beauty is that it can still auto-generate SQL if you need it to. So you can get off the ground quickly, but you can override methods as needed to hand-write the mapping sql
@rickchristie actually most of people who understand OOP cannot see the rason to use ORMs
ok .. that might not be completely true
@teresko I can see the reason. I just see it as flawed or unimportant.
yeah , there is reason to use ORMs that implement the DataMapper pattern , but only in simple cases
@ircmaxell - yup, so if I understand this correctly, we access the data from a business logic layer, the business logic layer applies business rules and then calls the data mapper/data access layer, right?
16:09
@teresko thanks, reading
and don't confuse the pattern with Rails/CodeIgniter ORMs of same name
right
then if we want to switch databases, we just switch the data mapper (using interfaces?), or maybe the data mapper is already using a database abstraction tool
Right
IMHO , a good MVC model contains two groups in it : Domain-objects and Mappers
@rickchristie fcuk the switching DB
16:11
posted on May 09, 2011

Gonzalo Ayuso has a new post to his blog today looking at a method you can use for real-time monitoring of your PHP applications with a combination of websockets and Node.js. The trick is to handle the PHP errors and send them over to a Node.js server for processing. The inspection of the error logs is a common way to detect errors and bugs. We also can show errors on-screen within our deve

if you implement data mapper , you can switch to different form of storage , @rickchristie
yup. right.
be it XML/JSON files , remote REST API or NoSQL
you just change the factory for Mappers
and the Model stays the same
@rickchristie Honestly, I think that's a flawed reason to use a DBAL. Switching is never as trivial as changing some settings (at least in terms of performance). All the queries and perhaps even the relational model need to be changed for the server. And if you don't do that your performance will suffer (making you think you need to change even more)
@teresko - right.
16:13
pick the RDBMS appropriate for the problem, and design accordingly. The rails mentality as it's only an implementation detail is down right wrong. It's a design detail that should be taken advantage of...
3
@ircmaxell - agree
@ircmaxell - what do you think is the right reason to use DBAL then?
@rickchristie to separate domain logic from data storage mechanics
I don't care for DBAL most of the time. I use a wrapper to make things easier and to expose a better api, but it's nothing more than an adapter
@teresko It also makes testing your application easier
You can create a mock data mapper that feeds you application fake data.
preaching to the choir
16:16
I did this with this small AJAX-based app I had to write and it was great for testing the UI.
@Michael Very good point
people in #yii@freenode couldn't understand the sentence "you cannot unit-test activerecord" :(
yup yup, thanks for the enlightening discussion guys :)
Anonymous
@rickchristie if you had more experience with a larger data set
Anonymous
you might understand what i'm getting at
16:18
> write a mock CDatabaseConnection and set the Yii::app()->db application component to that
Anonymous
well done, you solved the problem above, but then add another 100 different scenarios and start thinking about all the code you need to maintain.
this is how they understand "unit-testing Model"
Anonymous
you can't write a one-method-does-it-all magic SQL model
Anonymous
:/ that made no sense but you get what i mean.
@SkippyChalmers Sure you can. It won't work, but you can write it
16:19
@SkippyChalmers - I'm against that too. That's not what we're talking about
Anonymous
@ircmaxell too right :P
Anonymous
@rickchristie well actually.. that's what /I/ was talking about when i asked the question....
@SkippyChalmers - ah, then I misunderstood you, apologize
Anonymous
The point is, some kind of (further) abstraction to this would help a lot...
Anonymous
16:21
@rickchristie no worries ;) im can be terrible at explaining things
what exactly you want to abstract ?
sql query ?
Anonymous
@teresko i had thought using an ORM would help out a bit
Anonymous
but a heavy solution
@SkippyChalmers - to me, the data mapper is abstraction enough, as long as you provide decent documentation to the data mapper interface, maintaining shouldn't be too hard
Anonymous
@rickchristie not really... data mapping still requires plenty of hand-coded sql queries
16:22
but maybe I'm just haven't went through a use case for ORM yet
Anonymous
for "special" situations
@SkippyChalmers , i get the feeling that you dotn know waht "data mapper" is
Anonymous
@teresko i was thinking active-record style approach to reduce the quantity of SQL actually written, and therefore reduce the maintenance overhead. I'd love to be able to pass in a complex set of filters etc
@SkippyChalmers , when we say "data mapper" we mean martinfowler.com/eaaCatalog/dataMapper.html
@SkippyChalmers - Bingo. this is it. I don't feel that there's anything wrong with hand-coded sql queries at all, what's wrong with that? Maybe this is the thing that impedes my understanding of the need of ORM
16:23
a pattern , not an ORM
Anonymous
@teresko yes aware it wasn't an ORM... realised it was a pattern but thanks for the link.. i think i still had the wrong idea about it
Anonymous
@teresko so yes.. you still need to develop all that don't you? You still need to handle the transfer between the two
Anonymous
@rickchristie Maintenance. When you have 100 queries to maintain and they differ only slightly... that's what's wrong with hand-coded SQL. You try and merge all, or most of them into one method, and then you start having bigger problems.
@SkippyChalmers , im too lazy to explain it again .. here .. read : stackoverflow.com/questions/5863870/…
@SkippyChalmers - why do you need to merge them into one method?
16:27
@CalEvans "It's better to educate your staff and risk they leave, than don't and risk they stay"...
@ircmaxell++
Anonymous
@teresko thanks.. I get that... my point still stands. You still have to develop the mapper. in the case on SO, you'd need to develop the librarian.
Anonymous
guys brb.. good discussion ;) appreciate the help ! im away though for the day :D
well ,yes
each database is different
@SkippyChalmers - laters :)
16:36
Is it worth it to use hsla? With IE (who else?) not accepting it, and having to double-declare?
I mean, sure, it's super sexy and cool. But if there's limited support for it
you mean the colours ?
mornin guys
Tek
Tek
morning
@ircmaxell Followed :)
16:53
maxell you work in an office?>
What are your thoughts on CodeIgniter maxell? Do you think its appropriate to use for a startup?
Does anyone know the regex for matching more than 4 spaces in a string?
@Ryan [ ]{4,} ?
@Darren subjective question is subjective
@Robik No, since the default mode is to ignore spaces in the pattern
16:56
lol
ok
@RyanCooper '/ {4,}/'
@Robik @Zirak Thanks i was using \t ...
posted on May 09, 2011 by Sean Coates

Webshell is a console-based, JavaScripty web client utility that is great for consuming, debugging and interacting with APIs. I use Firefox as my primary browser. The main reason I've been faithful to Mozilla is my set of add-ons. I use Firebug regularly, and I'm not sure what I'd do without JSONovich. Last year, as I built Gimme Bar's internal API, I found myself using Curl, extensively, a

@RyanCooper /\040{4,}/
What are your guys' thoughts on ColdFusion? I am primarily a PHP programmer but we use it here at work.
17:02
What programs you usually do in new programming language?
@ircmaxell Thanks.
I've tried all three suggestions, it seems im doing it right however the code below doesn't match the spaces?

$data = 'Hello World This is a test string!';
$halt = 'String had more than 4 spaces.';
if (preg_match('/\040{4,}/', $data)) {
$data = $halt;
}
Programs?
I code CMSes, SaaS etc..
huh?
@RyanCooper That's a different story. You asked for 4 spaces, meaning 4 consequitive spaces. You want charcount of 4
different problem
ok, I gotta run. BB IAB
@ircmaxell Ahhh, okay. Thanks.
Let me see if i can figure it out on my own...
hi!guys wich is the common solution for telling a visitor counter to update only once per each user visit??should I register visitor ID into DB?
17:08
@RyanCooper - I think there's a PHP function for counting character occurance
@RyanCooper - substr_count($haystack, ' ') - does that work?
@Darren And for example in programming languages like C?
@rickchristie It probably would but im going to need to combine it with if more than 4...
@luca What does common matter? I'd log to database according to ip
@RyanCooper - yup, that's the idea
@RyanCooper so substr_count(blah blah) >= 4
17:13
@luca - try using google analytics and use their API to access unique visitors per month/day/year
@Zirak common is valid =) dont you think?
@luca No
Common is common. A billion Chinese people can also be wrong, even though they have the common opinion
@Zirak @rickchristie Thanks, i appreciate it. I used:

if (substr_count($data, ' ') >= 4) {
$data = $halt;
}
seeing that iPhone's commercial tagline is 'there's an app for that', PHP's commercial tagline should be 'there's a function for that', or 'there's a library for that', or 'there's a framework that do just that'
@zirak whatever! I thought to the IP as well but sometime I need a reference of a programmer with some experience.I think I found it =) since no chinese people are telling you were wrong
17:27
@rickchristie I thought that the developer commercial tagline is "Simpsons did it"
posted on May 09, 2011

On the Query7.com blog today Logan shows you how to create a simple wiki with the help of the Kohana framework, a HMVC PHP5 framework that includes several tools (including UTF-8 suport and a cascading filesystem) to make a developer's life easier. In this tutorial you will learn how to create a simple wiki using the PHP framework Kohana version 3.1. Several years ago Siddharta Govindaraj c

@ircmaxell humbug?
not really
just bah
17:38
Meeting?
no, just an SQL import taking forever to finish
it's at 32 hours and still has at least another 24 to 48 left...
Wow
Well, the import is running over a VPN, so each query is taking at least 0.1 seconds round trip due to the latency
212 GB of data over a 1.5mbps VPN link... Will take a while
Tom
Tom
Hi guys :)
Hello @Tom
Tom
Tom
17:50
is it possible to define how an object will evaluate when put in an if() statement?
I want my object to be "falsy" when evaluated in an if()
is that doable?
define('MY_OBJECT', true);
You mean constant?
Tom
Tom
no, an object like a class instance
with methods and properties
no
you'd need to use a method
You can create getIfEvaulation()
Or some tricky trick:
@Robik Code review failed, commit rejected
17:53
if($obj(true))
@ircmaxell Noooooooo!
:(
@Tom Why would you want to do something like that? What are you checking for?
Tom
Tom
wait a sec, im on the phone :P
@ircmaxell Why?
why what?
Why commit rejected?
17:59
what does getIfEvaluation() do? What does it mean? What is it checking for? It's a horrid name, with a questionable justification
Tom
Tom
Ok so basically I'm writing a "wrapper" (don't know if it's the right word) for Memcache which will allow me to give the flat Memcached hashtable dimensions (emulated of course)
it works like a charm excepting one detail

« first day (205 days earlier)      last day (4970 days later) »