« first day (1144 days earlier)      last day (3819 days later) » 

5:00 PM
lol
 
Oh boy he replied.
 
To check that the array was returning each column from the database, I did a print_r and it printed correctly. However, when I try to call a specific column from the array, it returns saying "undefined"
anyone?
 
@AGirlSaidMySmileIsCute as the error message says: it's undefined period
 
Array ( [0] => Array ( [id] => 11 [Name] => Lucas [abbrev] => LUCAS ) )
 
5:03 PM
@JoeWatkins right, because more people having Honda Civics than Bugatti Veyrons totally means Honda Civics are better cars.
 
Notice: Undefined index: abbrev
@HamZa ^
 
@AGirlSaidMySmileIsCute How are you accessing it ? don't tell me $array['abbrev'] ?
 
I kinda am accessing it that way.
$homeTeamABBREV = $homeTeamInfo['abbrev'];
 
And what about you try $array[0]['abbrev'] ?
 
@BenjaminGruenbaum it makes honda civics a more suitable car for the vast majority of the humans on earth ...
 
5:05 PM
@JoeWatkins yes, but only because it's cheaper. Just like PHP.
bite goddamnit
 
Well that works, but why do I need a 0?
 
@AGirlSaidMySmileIsCute Because data-sets are first divided into rows, then columns.
$dataset[$row][$column]
0 is the row number (first row), column is the abbrev.
 
user895378
@BenjaminGruenbaum Elitism is the opiate of the unsuccessful product ;)
 
user895378
I jest.
 
@rdlowrey you should start writing code on a netbook.
 
user895378
5:08 PM
@BenjaminGruenbaum lol
 
user895378
touché!
 
@BenjaminGruenbaum maybe, but what does that actually show ?? absolutely nothing; other than it being a more suitable vehicle, just like PHP is a more suitable language ... not, by the way, a more suitable language for writing the best code we can, but the most suitable language for making things that are commercially successful ... very few of us get to engage in cutting edge design when we are at work, which is why we all invest so heavily in our own projects ...
regardless of what compiler creates the best byte code, any professional ignoring PHP at this point is slicing their own throat ...
 
@JoeWatkins so cheaper, and easier to get a job in if you're bad?
Oh! Also they let you commit random things like goto to the codebase if you know C. Totally forgot about that.
 
user895378
I will defend PHP goto to the death.
 
5:12 PM
I got Zend karma about a 2 weeks ago, not everyone can commit anything, dunno what you're talking about there, is it something in particular that happened that I missed ?
 
@JoeWatkins You can totally ignore PHP today - there are plenty of alternatives. I don't, I like some things about PHP (shh, don't tell @JoeWatkins I said that) - but web developers can safely ignore it depending on what they work on. There are plenty of Rails shops, or ASP.NET shops, or Django shops, or Sails shops.
@JoeWatkins that thread where someone said "I wrote goto for fun, I don't think it should be added or anything" and it totally got added :P To be fair it was in ~2005.
 
You are ignoring 80% of the clients that exist if you do so, if you feel that secure then go for it,but statistically a professional is shooting themselves in the foot if they cannot pay it serious attention ...
 
@JoeWatkins I don't want 99.9% of clients anyway.
Neither should you, you're good enough to get the 0.01%
 
@tereško well done!
j/k
 
@BenjaminGruenbaum in reality i doubt that..
 
5:16 PM
I am currently examining the possibility of "actually caring"
 
I have no problem with goto ... it's a perfectly reasonable instruction that you execute all the time anyway_ ... people often have to find strange defenses, I doubt it is the case that it was added by accident, that sounds like politics to me ... the people who decided that will go in done it on purpose, and they done it because there is nothing actually wrong with it, it happens to be open to abuse, that is not our problem ...
 
@tereško How's that going for you?
 
sorry
got distracted by reddit
 
Those kittens get me too @tereško
 
look at it another way, you are forbidding yourself from being involved in potentially 80% of the cool projects out there ... not you, I know you have some experience, but I hope you don't really ever advise anyone that they can safely ignore PHP, that seems reckless advice for one professional to provide to another, even worse an amateur ... it's not about picking clients and languages, it never is about that, you should have enough experience with anything major that if something cool comes
along, you can be involved ...
 
5:19 PM
@JoeWatkins I can't believe you bit.
 
you shit ...
 
^^
@JoeWatkins To be completely honest when I hire developers I don't care what server side language they know as long as they understand how client-server coding is done. There are factors that are much much more relevant.
Also, learn better JavaScript. Now that's a language no one can really ignore today. (Hopefully that won't be the case in 5 years)
 
Who needs JavaScript when you have jQuery?
 
Hah.
<3
 
:-]
 
5:23 PM
agreed. jQuery is better than javascript
 
@Lusitanian I rest my case. @BenjaminGruenbaum :P
 
@MadaraUchiha :P
 
MooTools never stood a chance.
nor JavaScript
 
"Hopefully that won't be the case in 5 years"
For 99% of the cases, it's kind of the case today...
 
@MadaraUchiha What?
 
5:24 PM
When looking for javascript things these days in google I actually have to use "-jQuery"
 
Sure, you can write readable, clean code with vanilla JS.
But sadly, for most usecases, you don't need to. If you know jQuery, and have the ability to Google plugins you need, you don't have to learn JS today.
 
@MadaraUchiha all jQuery does is simplify DOM manipulation in some cases. If you think all client-side is DOM manipulation you still have a long way to go.
 
@Fabien then google will return "no results found".. LOL
 
@BenjaminGruenbaum depends what you do, I've no interest in frontend programming, none at all ... still I don't think anyone was really ignoring javascript, I remember the web before people knew how to use it, was a very different thing ...
 
@reikyoushin Heheh ;D
 
5:25 PM
@reikyoushin heh pretty much
 
@JoeWatkins it doesn't just do frontend.
 
yeah, it does ...
 
@BenjaminGruenbaum I don't, what I'm saying is, for the crushing majority of sites, jQuery is enough. No JS knowledge needed.
 
node.js?
 
5:26 PM
that's a trick ...
 
@MadaraUchiha jquery is the second coming of dreamweavers snippets
 
a popular trick
 
@JoeWatkins no it's not. You can't dismiss something companies like Linkedin and Paypal use in their backend as a trick, you can hate it, you can say it's bad, but it's not 'a trick'.
 
@Lusitanian go away! jQuery will crush you!
 
never, not one single time, did I meet anyone that said to me "it would be good if we could write our mission critical software in javascript" ...
 
5:27 PM
Also, mobile apps, desktop apps, database scripting.
 
user895378
@BenjaminGruenbaum Technically node.js is a compiled non-blocking IO abstraction that plays nice with V8 ... it's not javascript, per se
 
@JoeWatkins I have a use case, but it could have been done via JMS as well
 
@JoeWatkins I have.
 
Node was used because the developer didn't know any JavaEE
 
@rdlowrey It's a platform, you end up coding in JS.
@Ocramius I do, I'd still use node in plenty of cases (not all)
 
5:28 PM
@BenjaminGruenbaum Indeed =)
 
@Lusitanian I think the 'Code Example' part on that is a bit stupid/biased..
 
user895378
I like what node does, and any language is garbage when used incorrectly without filtering the bad parts ...
 
I don't know much about node, but it's not been very compelling so far.
 
@Ocramius Heh, I google JMS and the first thing I get is Just My Size pushup bras. Man, I really hope you've implemented a web app with a bra.
 
@rdlowrey a serious company should pick it up. Joyent are annoying me so much.
 
5:29 PM
@cspray uhmmmm....
 
@Lusitanian why was it that vanilla js example does not have a script tag while jquery has.. if you remove the script tag it becomes far shorter..
 
user895378
@BenjaminGruenbaum why bother when I have the full power of php at my disposal :)
 
@BenjaminGruenbaum actually closest to what Cake implements is variation of Rails, which itself used a simplification of "page controller" pattern
 
Anyway, I'm out of battery. @JoeWatkins JS is pretty much idempotent and apparently a lot of people like it. Dismissing it is much worse than dismissing PHP right now imo.
@tereško I suck at server-side pattern names, good to know though. If you ping me with an article about it I promise to read it.
 
I am sensing a JS vs PHP for Server-Side war on this room.. >.<
 
5:30 PM
@reikyoushin Not every discussion is a war and the two aren't mutually exclusive.
 
I'll speak up for perl. :P
 
Anyway, 3% battery. See you all later.
 
@reikyoushin waaaait, you just said "JS" and "Server-Side" in the same sentence?
 
@BenjaminGruenbaum because usually I only use JS for client side.. and PHP on the server side..
 
node more specifically
 
5:31 PM
I may be a newb against you, i know.. but that's usually how it is..
 
@BenjaminGruenbaum opinions are only worth something if they are backed up with facts, javascript barely shows on the radar as a language to use server side ... I simply have much better options available ... 0.1% is the actual number, 0.1 .... 80 .... big, huge difference ... factual difference ...
 
user895378
@BenjaminGruenbaum later
 
node has struck me as a "We CBA to learn a server side language, so we'll make node". But then again, I know so little about it.
 
the same reason why i thought trying to use PHP for a desktop app is a bit.. nerve-wracking..
 
5:32 PM
Thing is, a website was supposed to have a single page-controller based triad in that scenario. Rails used it as starting point, replicated for all "endpoints" and replaced views wit templates and model with collection of active records .. but underneath, it used Page Controller as the base of their design
 
@JoeWatkins that's because your radar is tuned at, as you describe things that are not "engage in cutting edge design when we are at work". Also "I haven't seen" isn't facts.
 
the concessions were taken to improve the ability of prototyping , but as marketing or Rails took off, other frameworks begun copying it
 
@tereško thanks, that makes sense. I can totally see why they do that but to be honest I'd never use rails for anything that isn't completely boring
Battery out :/
 
user895378
I love PHP, but node is so much smarter than the PHP web SAPI as a technology. The end. That has no bearing on how important it is. The masses will continue using PHP because it's so easy and you don't have to know anything about anything to make web pages with it.
 
@BenjaminGruenbaum w3techs.com/technologies/overview/programming_language/all these are the most reliable facts that exist ...
 
I'm not arguing that C# might allow better design, node might have a better SAPI, being >15 years it's junior it would be terribly disappointing if it wasn't an improvement in some way ...
but according to the facts of the matter, and what I see with my own eyes, and ears to the ground, those things don't matter so much as what you can make commercially successful quickly, for the foreseeable future that will be PHP ...
 
user895378
@JoeWatkins Totally agree.
 
FWIW I've grown to love C# but .NET is just...ugh
 
... I wonder how that post got two upvotes already
 
stackoverflow.com/q/20357751/871050 Sweet mother of god what a cold, heartless instructor.
 
5:44 PM
lol
 
I like C# the most when I'm on windows ... but that's preferring being shot in the ass to being shot in the face ...
 
that asm code looks actually quite straight-forward
 
don't like windows ...
 
check the comments :
- can you give the link of a windoows 8 exploit? and one for windows 7
- plz tell me how to create ER diagram
 
Idiocracy was actually a documentary film
 
6:01 PM
@MadaraUchiha you're Wrong, at least try reading a little more about CakePHP before saying such thing. — Guillemo Mansilla 1 min ago
=_=
 
@MadaraUchiha ?
@MadaraUchiha could you please provide an RFC or specification for the correct implementation of MVC? — user3062162 1 min ago
since when did MVC need an RFC o.O?
 
@reikyoushin Since now, apparently :\
 
@MadaraUchiha I'm sorry brother, seems this is a lost cause..
You can't help someone who doesn't want to listen..
 
Yup, I am withdrawing my interest.
 
To be fair, you made a controversial statement with no supporting reasons. Can't really blame the response.
 
6:11 PM
@iso27002 My statement is not controversial, it's a fact.
And to be fair on your fair, I did invite him here for more in-depth explanation :)
 
It doesn't require another forum for explanation, though. You could easily have added even a single reason in your comment.
And whether it is "fact" or not, Cake is labelled everywhere as MVC, including in the StackOverflow description of Cake.
 
@iso27002 CodeIgniter is labeled MVC too, would you call it MVC?
 
I get the sense you are just being pedantic, but such is life.
I have never used CI, couldn't answer that.
 
@iso27002 I am not being pedantic.
 
Hey @iso27002 what is the difference betweena a 3tier, model2 and mvc?
 
6:14 PM
Nah, he's not. CodeIgnitor is not mvc
Neither is cake
 
U suck.
 
Cake is falsly barnding itself as MVC, even though the concepts are entirely different.
 
Neither is Symfony - and they at least don't make out they are
 
@iso27002 what exactly is your question ?
 
They contribute to the confusion around MVC and causes people to believe that it is true MVC, which is not.
 
6:15 PM
@tereško I wasn't aware I had one ;)
Ah. "True" MVC.
We've hit the nail on the head.
 
you had a statement you wanted to make then ?
or you just wanted to troll ?
 
@iso27002 True MVC cannot be implemented in web context. At least not trivially.
 
@tereško What is the point you are getting at?
I am the troll? Please
Grow up
 
Do you have a question? Do you have a statement that you want to make? A comment maybe? Or is your intention make noncommittal repetitions of phrases while being convinced of the superiority of your position?
I'm kinda confused about your goals ..
 
I believe almost, if not all the regulars here would agree that cake is not MVC..
 
6:30 PM
mmmmmm... cake.
 
@webarto hey, you're late. harhar >:P
 
hi
 
Do you think a domain object should be able to convert its data into an array? E.g.

$order->toArray();
or
$order->toJSON();

Or do you think that job is better suited to the service layer?
 
lollerskates, people see me trollin' all like "DURR CAEK IS EMM VEE SEE!"
 
theoretically - no, they should not be responsible for formating the data in some formats, but in practice it would depends what are you doing with that JSON
 
6:40 PM
That responsibility would fall into the service layer?
Because that is how I have it right now
 
@David Don't see why not. Depends on your needs.
 
Well with the array it is more for binding it to the template
 
@David Usually you'd go through the presentation layer, but if that JSON or array aren't needed for presentation, sure.
 
^^ wrong ping
 
@David formating output falls in View's area of responsibilities
 
6:44 PM
Yup, sorry
 
the particulars of "where in the view" would depend on your implementation
 
@tereško And so the question remains, is it for output? @David
 
In the view I like to be able to ask whichever service for that product in array format so I can bind it to the template
or for that user or order etc in array format
 
stackoverflow.com/questions/20358790/… .. or someone could write a proper answer to this explaining to OP all the ways in which he/she is wrong
sounds more and more like you want to push presentation-related tasks on the application logic
I probably would implement this by having a presentation object, which is capable to transform an array in any sort of data format (or maybe a separate one for each format ... depends on whether it's full moon or not)
 
@tereško I wouldn't close it
OP shows some understanding, and he is trying to learn.
 
6:51 PM
but someone should make a good answer for him
some of our pre-10k regulars could do something about it
 
Is web MVC currently the best way to organise/seperate your layers in a medium to large sized website? What about MVP or MVVM, are they worth learning?
 
Guys, I see sometimes a big war between those who believe that Cake/CI are following the MVC pattern and those who don't. Why don't you write an article on why it's false so that you won't have to argue with 20 comments on each post ?
 
lol
@David those architecture are aimed a the same size group.
in small sites what you really want is just simple good OOP, with some SoC applied
 
I now hate the old way I used to do websites. I hate checking at the top of the page if the form was posted etc. Now I love just going into the post*() method of the controller and extracting the form data and sending it off to a service
 
^ there seems to be a bug in my language processing unit .. maybe I better make a quick run for beer
@David that part can be done by a minimal routing "framework"
I actually have been trying to make something like that for myself ... since I hate to bake something quickly up every time I need to make a small app
 
6:59 PM
@tereško Never used one of those. Went straight from the controller being at the top of the html and spaghetti code straight into MVC, with CI which started me off in the wrong direction and a lot of pain and refractoring afterwards
 
lol ... I am not sure if even people, who pray to CodeIgn0ter gods, like their routing system
 
@tereško Their system is regex based, IIRC.
@tereško tell me what you think.
 
@MadaraUchiha yes .. but it uses arrays keys for part of the matching, and then there are defaults as the value ... or something
I have never really cared enough to figure it out
 
A routing system, that instead of accepting a notation or a config file, accepts maps of callables to certain resources/actions.
 
@MadaraUchiha You do that?
 
7:03 PM
No, I'm thinking about doing that
 
@MadaraUchiha Where you define a route you also define a callable that will be invoked? Would the callable be the controller?
 
@MadaraUchiha that's more-or-less what I am trying to do
 
libs work fine
 
I should write up a documentation for mine
 
@tereško Wanna start a semi-OS on it?
 
7:05 PM
semi-OS ?
 
Like Open Source, but not really expecting contributions :P
A "collaboration" is a better phrasing.
I also want to gain a bit of experience with working in a team with another developer. Since I have very little of that.
Only if you're interested :)
 
sure , why not
 
Does anyone else hate pagination? I mean HATE it?
 
but that would actually require a plan
@David everyone hates it
 
@David I hate it almost as much as I hate hashirama.
 
7:08 PM
When there is all different ways the results can be filtered and all crazy clauses that have to be passed from page to page
 
and just like with form validation - everyone try to make a magic solution which generates it
 
@tereško form validation is simple (I also like using callbacks on it)
 
@tereško I think I have come up with the best form validation way ever created with callbacks
 
@MadaraUchiha what people usually do is start with "ok , now we need a form generator"
 
@tereško And that's where it comes to pieces :P
 
7:10 PM
I can do all the regular validations like size, format, equal to another field etc without any work and really cleanly and then can add in callbacks for more complex rules so there is no restrictions I have hit
 
more or les ... yeah
 
@HamZa then maybe you could ask one of the bloggers, possibly @ircmaxwell if he is willing to.. but that could spark another war, or in other words, you just moved the war from this room to his blog.. which is gonna be bad.. (but good for traffic XP)
 
Does anyone else here have problems finishing a project and it is only the easy stuff that is left to do?
 
@reikyoushin I was more thinking in an article on github (gist), but if it's a blog. Why not ?
 
I go off for hours on something that is already working trying to make it work better and more efficiently and cooler and just can't get myself to do the simple crap
 
7:13 PM
Just discovered why my coffee this morning was so lumpy. Now I have thrown the milk out. :(
 
@Fabien ugh, that's brutal. I think I just threw up a little.
 
@David I find it's a matter of interest. When I start a project it's shiny and new, by the time I am nearly done all the shiny/new has gone :(. A little like a hand-written exam. You start off by going "This is going to be super neat, legible handwriting." By the end you're like "Fuck it... squiggles".
@cspray I think I got off lightly. been over 10 hours and not feeling any rumblings.
 
@Fabien I'd say.
 
@Fabien Yeah thats true. One thing that kills me HTML and CSS. Coming up with names for class and ID's
 
@David Yeah. Leave it to the front-end guys.
 
7:17 PM
And then thinking hmmm is this div sharing lots of properties that this class has, how should I now name them or is this bit of duplicate CSS okay, drives me mad
 
You could spend a long time doing it but it just doesn't feel as important or fun as back-end naming.
 
Yeah defintely
 
People talk about applying OOP to CSS.
 
I was just going to say that
I never thought it through what the benefits/bad things would be but I would love to try it
 
fairly old too.
 
7:19 PM
Variables in CSS would not go a stray either I think.
 
For nettuts the OO CSS does a decent job of explaining what it means.
 
Yeah gonna read it now.
What do you think of the HTML Twitterbootstrap generates?
 
The frameworks of front-end. Great for non-designers. Ultimately it's about how much you care for the final product.
GRID systems too.
People build for bootstrap. Designs that is.
 
When I first saw it I couldn't believe how much HTML there was for a simple 5 field form
Maybe the guy who coded it did it wrong and did too much HTML but I don't think so
Classes all over the place insane amounts of nesting
Don't think I like it
 
I feel for them though. Commercially dealing with browser incompatibilities.
Have you ever taken a look at Google's HTML? :P
In particular G+
 
7:23 PM
No but im about to
Im assuming it is not amazing like one would expect?
 
It's a bit like that OO CSS tutorial. Except unreadable.
 
What the hell
That must be compressed
Not even sure if some of it is embedded javascript, about 3,000 lines of it
 
Most likely. They don't use that compression on youtube though.
Google believe small amounts of javascript should be inline for speed.
As it's faster than sending a request for it.
 
I remember checking youtubes before to check if they used hyphens or underscores or lower camelcase for their class and ID's
Was in an argument with my boss about what to use on his site
 
I am back
 
7:27 PM
wb
 
and I have beer now
 
I'm a hyphen guy for css. But I struggle with consistency. I think there's a metronome in my head switching from underscores to hyphens for css.
 
heh ... I learned about OOCSS about 5 years ago from stubbornella's talks
 
I used to be underscores then lower camelcase and now hyphens for about the last 4 or 5 years
Since HTTP headers use hyphens and CSS uses them and HTML attributes I think they should be hyphens when naming classes
 
I especially like the sort-of nesting in OOCSS
@David Aye. as long as no one forces me to use them I'll be fine. I'm sure there's some CSS standards committy somewhere shaking their fist.
Definitely check out SASS/LESS since you mentioned variables in CSS.
 
7:31 PM
@Fabien the FIG CSS Edition.. perhaps BIG (Browser Interoperability Group)?
 
Yeah I will
 
@reikyoushin exactly :P
 
Reading the OO CSS now
There is too many things to learn in this area of work
 
@David Aside from cross-browser it's less stress IMO.
 
What age were you when you started coding
 
7:33 PM
started with pascal at 16, first wrote php at 21
 
HTML/CSS 13 probably. PHP 22 ish
It was nothing more than an interest for the longest time.
Right click > View source.
 
Coding your own games perhaps @ircmaxell?
 
yup
 
7:36 PM
wut
 
nice panorama :P
 
I started HTML when I was 11. All started when I wanted to make money on the internet. Was using one of them WYSIWYG editors to make a site and thought it was great...Then started looking at the code it generated and it scared me.
 
Frontpage and Dreamweaver.
 
Not even them, this Javascript WYSIWYG editor in the web browser
 
~15, but I wasn't too dedicated to it
 
7:37 PM
Like Geocities?
 
zomg geocities ftw
 
@Fabien fortunately I was blessed with classmates that had brains
 
@Fabien i started from friendster doing all those sparkly sparkly things.. LOL (shame on me)
 
^ css fail in opera for me again
 
7:39 PM
`Mornign
 
Amazing. Who put that in there?
Hey @PeeHaa
Any martial art film buffs here?
 
Thanks, that's exactly what I've started to do, and it's working out great. Luckily for me CakePHP facilitates this quite easily, which confirms I made the right choice in framework. Nothing like getting an app up and running in a couple of hours, magic! :) — user3062162 1 hour ago
 
They only shoot themselves in the foot this way
 
@igorw I'm calling the middleware right after my last route in controllers.php like this, the ctor is being run as I can echo within it and it shows up. However the handle() method is not doing so.
 
@ircmaxell but does it account for leap seconds?
 
7:52 PM
@igorw More importantly: does it need a default timezone :P
 
@crypticツ what do you do after that piece of code?
right now you are not running the app at all
@crypticツ use this github.com/stackphp/run
bbl, food
 
@igorw well it HAD $app->run(), but script failed with the error of Call to undefined method KyraD\Stack\ContentSecurityPolicy::run()
 
also ... somebody flagged comments for that question (which is why mod closed it)
 
@igorw so can I just add that run method to my class?
 
@rdlowrey Yeah, a dedicated method for that would be a nice feature =D
 
user895378
7:57 PM
@Jack Totally agree. I'm about halfway through with the feature now. It's a pretty cool thing. Thanks for the inspiration :)
 
Wow cool hehe
 
user895378
But it's only useful if you're getting large files ... the connection and protocol overhead of using several requests to get a single resource is outweighed for anything that would take less than a couple of seconds to retrieve serially in a single request.
 
user895378
But you should be able to get a roughly linear improvement in download speed for each additional simultaneous request until you hit bandwidth limitations. And generally dynamic resources won't support byte ranges ... that's something that is usually limited to static files because the resource's Content-Length has to be known ahead of time by the server. But you could, for example hammer a large download for a linux distro's .iso file much faster in this way.
 
user895378
API looks like: $client->requestSplit($uriOrRequestObject);
 

« first day (1144 days earlier)      last day (3819 days later) »