« first day (225 days earlier)      last day (4948 days later) » 

08:58
G'Morning
 
3 hours later…
12:22
posted on May 29, 2011 by Lukas Smith

This is just a short follow up to a recent tweet of mine. I have seen this repeatedly happen, even to top notch and usually very careful developers (*). I am not sure why this mistake happens so frequently, but quite often you see code that changes the parameter order for custom Exception constructors. I guess it's mostly because in these cases the developer wants to pass some magic parameters

 
3 hours later…
15:36
Afternoon.
Hello @Pixeltweak
Hi there @Robik, how are you?
Fine, and you?
Doing great!
Good to hear that :)
15:38
First time being in the chat rooms, is it usually more active in here?
Yes.
@Pixeltweak - yes, look at the chat history
Usually this room is active
Awesome, I'll stick around for a bit then.
So, framework of choice, if you guys use any?
I don't use framework ( and i've never used ;) )
15:45
@Robik lemme guess , you haven't written one either
I have. One-file, one-class "framework" ;)
Nope, more than one class :D
@Robik is there a specific reason? Or just personal style?
I'm native.
Basically i don't use frameworks because i don't use MVC (first reason)
i suspect it it because you do not understand Model2
I just don't like MVC
15:52
@Robik Is there any particular pattern you use to keep your code maintainable?
@Pixeltweak , as for your subject ... all php frameworks sucks , but some suck less then others. I would recommend looking into some from Kohana 3 and Symfony 2 bloodlines .. especially : Lithium and Silex ( respectively )
I use Models.
"models" are not a pattern
Yeah, it is not, but if i don't use any pattern?
@teresko I use CodeIgniter, and I feel pretty comfortable with it.
15:55
my condolences
@Robik , it looks like you dont even understand the basics .. people don't use patterns ( at least not ones with some clue) , instead they write code which conforms to some pattern or another
patterns are not templates for code , but a descriptive names which explain the behavior of said code
I never said it's tmplate for code
you haven't said anything useful at all
I just don't implement/use any architectural pattern
@teresko I don't think any framework is necessarily a wrong choice, it depends on how the hacker uses it. I use it cause of it's stability and useful libraries of tasks I usually use on most of my projects. It won't be a glove to everyone, but to some it can increase and/or decrease productivity depending on it's use.
i beg to differ
16:02
Enlighten me.
any framework, where you have to jump thought hoops , just to implement unit-testing , is wrong choice
any framework, where you encounter some sort of magic on each step, is wrong choice
I'm assuming you're against Ruby on Rails, as well?
any framework, which implements MVC as template for V and ORM for M , is the wrong choice
@Pixeltweak , RoR was never meant for serious , development .. only for prototyping
I disagree.
any framework, which contains PHP4-centric code, is the wrong choice
@Pixeltweak , then you disagree with the developers of RoR .. which is kinda childish
16:06
DDH argues the notion that ROR can't be used for serious development all the time.
besides , RoR is the worst thing that happened to PHP in last 5 years
Particularly when it was under attack being tagged by developers that it was only good for speaking and teaching purposes.
Plenty of large sites use ROR, in cases I believe are more than just a prototype.
name one large site
Twitter, LAL, Groupon
because outside projects from 37signals , i havnt seen any
oh
what is LAL ?
16:09
Like A Little
GitHub
Shopify, Yellow Pages
BTW: yahoo store was written in lisp ;)
with large sites i meant things like amazon and yahoo
@Pixeltweak do you like RoR? go ahead and write an app using it.
Yeah, Yahoo! store used to be Viaweb, which was co-founded by Paul Graham. Who was a Lisp Hacker.
16:12
@Pixeltweak yes, viaweb. hackers and painters is also interesting book to read.
@teresko They still use Rails.
And considering this was 2-3 years ago, it's not very relevant to it's improvements.
ok , explain this to me
I'm not here to defend ROR in itself, I just want to debate the statement that all PHP frameworks "suck".
why did you even drag RoR in this ???
16:14
Because many PHP frameworks use ROR as a role-model for their structure.
and how the fcuk "rails is so cool" counters the "php frameworks suck" statement ?
8 mins ago, by teresko
besides , RoR is the worst thing that happened to PHP in last 5 years
this was about you beloved "RoR as role-model"
Have I stated I believe "Rails is so cool"?
Not mines. Simple many other PHP frameworks.
@KamilTomšík So I've heard. I haven't had the chance to read it just yet.
lemme guess .. you had an urge to reassure yourself about the superiority of CodeIgniter , and you encounters a disappointing counter-argument
Not at all, I was simply curious as to why you would suggest that all PHP frameworks suck, even though many developers use them.
I wouldn't go on to say your method of coding sucks, simply because not only have I not tried it enough to judge it properly, but because every developer has their style of coding.
@Pixeltweak he basically says why LISP was so great for him and how uber it is, because everything can be changed. I think he's well aware of fact that controversional book sells better than ordinal ones. So I don't blindly agree with everything, but he has some points. And I would also hardly consider "powerful" languages for startups. Which does not necessarily mean LISP
16:23
@Pixeltweak i already liste three problem that php frameworks have
or did you missed them ?
@Pixeltweak I agree with @teresko that RoR and its PHP-clones are good for prototyping, but not so good for future development - because there are a lot of rules you have to obey.
@Pixeltweak prototyping or startups too - when you don't know how much you will need.
@KamilTomšík Thanks for providing a more constructive perspective.
Is there a simple way to convert an overflow-ed number into a string, and preserve the full values? I have a number being converted by json_decode into 1.3442730951692E+18, and I need the actual number.
intval() or floatval() ?
16:27
@Robik other way around. PHP can't handle the int value, so it overflows. I'm hoping to preserve it in a string
@יהל if the value has already overflowed, then there isnt much you can do about it , you will loose all but fist 10 digits for precision
@teresko damn. damn you, json_decode. thanks.
6
Q: how to have 64 bit integer on PHP?

動靜能量does someone know how to have 64 bit integer on PHP? it seems like it is not by config file but rather it might be a compile time option and it depends on the platform?

this might help a bit
AH HA!
@יהל PHP is bastard, isn't it? ;(
16:29
looks like there's also a JSON_BIGINT_AS_STRING for json_decode
Damn, its not supported yet.
Thanks, @teresko, I'll try that.
@Robik Yes.
you can always just turn all your integers into strings befor converting them to json
@teresko That's probably his bet bet.
but even them you will have to make sure that the receiver of that json file will be able to handle large numbers
oh .. and for php side , there should be some classes made to handle extra large numbers for scientific calculations
17:24
posted on May 29, 2011 by Thomas Koch

It's 2011. Computers are here for a couple of decades now, but they still don't help me with the most simple problems. I've been asked once again about a recommendation for a GroupWare and still don't know what to say. This are the simple requirements: Manage my Mails, Calendar, Contacts, Files, Knowledge (Wiki) and ToDos (including IssueTracker). Let me synchronize these informations w

18:05
How do I execute an IF{} block in PHP if my MySQL_query() fails?
Should be possible, right?
18:18
mysql_query() should return false if it fails, so you can compare it to false, if that's what you mean
or assign to variable first, then compare variable:
$query = mysql_query($sql);
if ($query === false) { ... }
(as an aside, you might want to look at PDO, or mysqli_ functions)
Alright, why three times = instead of two?
^and yes, that works just fine, thanks :]
18:51
because === compares types too
@Chris , as for mysql_* , you should really stop using the outdated functions
 
2 hours later…
21:06
Aww, missed a great Friday Night (themed with "MVC Sucks" rant). Wish I could join in. Maybe another time.
Here's a little riddle (possibly?) for the great minds in this room.
What would you do if you needed to use docroot in a script ran from command line ( `php -f script.php` )?
21:44
@ChristianSciberras define a docroot manually?
21:56
anyone in here have experience with envjs and rhino?
0
Q: EnvJS, setTimeout() not working

Kenny CasonI currently set up EnvJS on my system (installed from here). My end goal is to load a page let it's javascript process for a few seconds, and then read the dom to get the information of interest. However I can not get setTimeout() to work to save my life (Or JQuery for that matter). I have a php...

I've been racking my brain on this problem for too long now :P

« first day (225 days earlier)      last day (4948 days later) »