« first day (2348 days earlier)      last day (2599 days later) » 

12:00 AM
@DaveRandom Yeah, and let me tell you. By about halfway through season 7 I was looking forward to the deus ex machina ending that I knew was coming.
 
@Sara I never watched any of them until a couple of years ago, ended up taking a break between S6 and S7, was really distressed by how bad most of it was
 
DS9 is the best of them IMO, and it had serious issues as well
 
I think TNG hasn't been bettered yet, although you never know, this new thing might beat the odds and be good
I'm hoping it will at least be watchable
 
Wes
/me has never watched ds9. it's the only star trek i didn't watch :B there is no trek without a spaceship is the main motivation :B
never liked voyager much. i liked enterprise, though. cast was perfect
i should give ds9 a try sooner or later... but just because there's worf in it
 
12:17 AM
@RaduStefanPopescu The benefit here is that I separate some concerns. Security is the first thing to be processed, if the security check fails, no controller is even even instantiated.
If it passes, the controller can focus on application level logic like working with models. It makes your controllers more DRY, and reduces the exceptionally wide scope of responsibility for a traditional controller.
 
i prefer injection
much more
 
That makes for thicker controllers with more boilerplate.
 
Instead of having theoretical policies which you manually implement I every controller, you have them defined. They are easy to find, and can be edited with much more simplicity.
 
suggestion: security belongs as close to the business logic as possible, preferably as part of the business logic. Since there are usually multiple ways to reach the same logic, it's the only way to maintain consistency
 
12:21 AM
@RaduStefanPopescu Why do you prefer that? I'll be the first to admit, I'm no senior dev. I'm interested to know.
 
meaning: controllers shouldn't know about security checks at all in the first place.
it should be at your service/domain model layer
 
many times security is tightly knit to presentation
you don't actually return a forbidden
you just return a page that shows less
 
@RaduStefanPopescu I would argue that isn't presentation. That's domain. Presentation displays what domain gives it. Presentation doesn't (often at least) need to know why, just that
 
controller composition is really nice too
 
@ircmaxell Now THAT is a good point. However, in a lot of situations it's much easier to group security by policy, especially when the client is authorized for use of the model or some of its methods too different degrees in different situation.
That seems to violate the Single Responsibility Principle to me.
 
12:24 AM
@Allenph well, it depends on how you view it. If you view security as "separate" from business logic, then sure. What I'm proposing is that security and business logic are actually one in the same. Authorization checks are part of the business rule itself.
 
And this middleware is essentially just abstracting those service calls to pre-routing. Allowing a separation between security and processing.
@ircmaxell, that seems wrong to me. Models should have one responsibility only: to abstract the database and to validate data going in and out of the database.
 
Ah, the "MVC is the DB" view, that's why it seems separate to you
there's another way of architecting it all
 
Controllers should be post routers which orchestrate the models and the views together based on route.
And the Router...well It's the router. It should know whether to deny you access and tell you where to go and what to do.
@ircmaxell Oh yeah?
 
Consider that the model isn't a class, but an entire application to itself. Inside that application you have a frontend (called a Service), a business object (called a Domain Model), a logic object (called a Model or something more specific to need) and a persistence object (called a Data Mapper). If you approach it that way, your "MVC" controller really just converts HTTP requests into Service calls. Your view just takes Domain Models and converts them back to presentation.
 
(Disclaimer: I write almost exclusively Angular Single-Page-Applications. The back-end is simply a RESTful DB abstraction for me. I almost never even render views on the backend, only return JSON)
 
12:29 AM
With that approach, you get a few benefits. One is that you are abstracted from your transport. So if you want to build a CLI or API on top, it's trivial to do so. Unit and Integration tests become trivial there, because each layer is perfectly isolated
give that talk a view
 
Cool. Thanks for the info.
 
what he's advocating for has many names, but the concept is the same. It's a form of Hexagonal architecture (sometimes called ports, or a nuymber of other names)
 
I think I should note, I got on the ORM train before I learned MVC. (Years ago.) So, I've never actually written a model from scratch and my only experience with them is as database abstractions.
@ircmaxell I think I'm kind of understanding your point, but it just seems to me that the amount of boilerplate doing it that way is significantly increased, business logic is of greater complexity, and there are a lot of opportunities to repeat yourself...a lot.
 
yea, sorry meant sth else by presentation
not the presentation/view/model-view whatever layer
controller many times sends an ad-hoc made dto
 
the boilerplate doesn't change much. What changes are the locations of the responsibility. Right now, the majority of your logic is entangled in your controller and middleware. I'm suggestion moving that and making the controller extremely thin (just mapping HTTP to domain entity), and then putting the rest of the logic into the service layer where it can be reused across HTTP routes and interfaces
 
12:34 AM
Also. Before we get any father, are we kind of in the realm of opinion and habit, or am I objectively wrong here? The more experienced I get, the easier the consensus on issues seem to be.
 
@Sara DS9 was created flawless, like semver or the human eye.
 
Except for Vic Fontaine
 
@Allenph you are not objectively wrong
you are very much in the realm of opinion
though, I think the original statement I made is still quite valid, even if you have a differing opinion on the rest: suggestion: security belongs as close to the business logic as possible
 
@ircmaxell I may be doing that already. I have a spot in BareBones called helpers which contains services and classes. Classes are used as prototypes, and services are Singletons. If I find myself utilizing a model or several models in the exact same way in several places, I will abstract it into a service...IF it is more than one line already.
 
ye see, here's the thing
if you're making a client application, it's really nice to work with aggregates
but if you wanna write sth really fast you can just dump everything onto the controller, and make a service when you notice you write same code twice
 
12:53 AM
@ircmaxell i'm confused now tho
if you want controller just to map to HTTP domain entity, then you have a router for that, and HTTP request types
 
Well, when a model and view love each other very much...
7
 
Hi pls help me align chart and plot area
of php excel
 
1:46 AM
@RaduStefanPopescu What do you mean by aggregate?
 
mostly what ircmaxell means by domain object
 
Wes
2:03 AM
an aggregate is a cluster of domain objects
plus scalar values, value objects
 
I need to read up on those. I'm not familiar with those terms.
 
noob question,
<link href="./bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet"/>
why is the person using ./ here?
i know it means current dir, but i ve never seen it in html codes
 
I created a little game
can you come to test it?
xD
 
@RaduStefanPopescu they often don't map 1:1, so there's some conversion logic there
 
what is the difference between <link href="./bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet"/> and <link href="bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet"/> ?
@neoDev very impressive!
 
2:20 AM
What's up with the flags?
I'm sure it has something to do with @PeeHaa
Oh, seems it's not just in here
 
Has anyone used Varnish to speed up their PHP site behind SSL/TLS and WordPress?
Someone at my work says that Varnish doesn't need help serving over SSL/TLS if they install a WordPress plugin ..
I call BS
 
the way i see it. you can replace almost everything with controllers. it really is because all the filters, the router, etc. they all take a html request and return a html response, or however you want to store that, they are functionally replaceable. And then you are left with just your business code and a set of functions. View is a function just as much as everything else
a set of nice monoids
thin controllers vs thick is just a matter of choice, of how far do you want to go into splitting it into functions
 
3:02 AM
@RaduStefanPopescu Essentially this is adding a controller in front of the route. In fact, it's almost exactly that.
In traditional MVC, there should only be one controller active per request, yes?
 
see what i'm getting at tho?
when you can write perfectly valid code like
$request_response.route.filter.controller.filter.view.show_response
-> instead of . i think
 
4:09 AM
god the amount of times I hear people talk about MVC like they love hearing how much they know about it
 
4:20 AM
refcount is diffrent from php 5.6.25 – #74279
 
4:34 AM
morning
@Jeeves morning sir.
 
@Linus Don't cut that with me!
 
Morning ^^
 
o//
 
\\o
 
4:53 AM
o//
morning
 
5:35 AM
@MikeKormendy, I'm explaining what I THINK I know because I know a large portion of you know more than I do, and I think more theory could help me.
 
6:07 AM
@Trowski Pipe is different from when, pipe will stay as is. And you only look at very low level libraries which mostly don't use any of them.
 
morning o/
 
\o
 
bob
6:51 AM
Morning all
 
Good morning guys, Is it possible to change line color of series in php excel?
 
bob
7:08 AM
@EarvinNillCastillo yes
 
7:27 AM
!!? Is it possible to change line color of series in php excel
 
Search for "Is it possible to change line color of series in php excel" (https://www.google.com/search?q=Is+it+possible+to+change+line+color+of+series+in+php+excel&lr=lang_en)
• php - PHPExcel color to specific row - Stack Over… - 16 jan. 2015 - You cannot style a row in PHPExcel, only a cell or a range of cells … How can I know… (http://stackoverflow.com/questions/27981676/phpexcel-color-to-specific-row)
• Set Background cell color in PHPExcel - Stack Ove… - 21 jul. 2011 - $sheet->getStyle('A1')->applyFromArray( array( 'fill' => array( 'type' …. In some ph… (http://stackoverflow.com/questi
 
@EarvinNillCastillo ^
 
o/
btw did you get my pings? :P
 
only just, will look at the problem tomorrow, was driving all from 8am yesterday morning (nearly 24 hrs), not very useful right now
 
7:41 AM
o/
 
\o/
|
/ \
fail
 
moin
 
ah good day sir @JoeWatkins
you have a good weekend of doing... whatever it was you were doing?
 
7:46 AM
I took the kids to south of france ... twas fun, wish we had more time there but school and blah blah blah ... 1979.2 miles of driving since friday afternoon ...
rough ...
 
yeh that's pretty brutal
I drove to Brittany a couple of years ago and that was way further than I thought it was
what were you doing in la France?
...other than driving
 
went to Antibes, spent the day in the sea, and night time walking by the beach with the kids and wife ... was nice, we were going to tell the school(s) to stick it and stay longer, but decided against it in the end, not worth being fined for ... went a few places on the way and way back too, but I don't remember names, got some nice photos though ...
won't be doing it again over a normal weekend, perhaps a bank holiday, preferably a half term ... didn't get to recover from driving there before we had to drive back ... I have an irrational hatred of the inside of my car ...
 
Hi Guys!
How would I simplify this SQL Statement:
SELECT * FROM Customers, Orders, OrderDetails
WHERE OrderDetails.OrderDetailID = 1
AND Orders.OrderID = OrderDetails.OrderID
AND Customers.CustomerID = Orders.CustomerID;
Possibly using INNER JOINs?
I'm not sure how to use INNER JOINs for 3 tables
Never mind, ignore my question.
SELECT * FROM Customers
INNER JOIN Orders, OrderDetails ON Orders.OrderID = OrderDetails.OrderID AND Customers.CustomerID = Orders.CustomerID
WHERE OrderDetails.OrderDetailID = 1;
 
getting this "An exception occured in driver: SQLSTATE[08006] [7] could not translate host name 'examp.rds.rds.amazonaws.com' to address: Name or service not known" this is a Symfony APP using Doctrine ORM
Postgres
 
> could not translate host name 'examp.rds.rds.amazonaws.com'
> Name or service not known
 
7:59 AM
happening just from few mins
all along it was able to connect
Also able to connect using cli .. ie `` app/console doctrine:query:sql ``
 
krakjoe@fiji:/opt/src/php-web$ host examp.rds.rds.amazonaws.com
Host examp.rds.rds.amazonaws.com not found: 3(NXDOMAIN)
is there supposed to be a tunnel to that address ?
 
just redacted the actual hostname, works from my side
 
possibly ssh crashed and took the tunnel down
regardless "Name or service not known" means DNS can't resolve the host
 
ya, but I am able to connect to it using cli
 
I got nothin'
 
8:07 AM
mrongins
 
yohaa
 
@codeMagic lol
Still my fault :P
 
@JoeWatkins , got the issue. Redis cache
also had an wtf moment early in the morning . ran redis keys * and it was showing empty list ( supposed to have around 20k keys ) .. forgot we were using multiple databases...
 
Hi, The homepage will be come bottom to top in Jquery animation. Any please help with code.
Like these git.blivesta.com/animsition/…
 
8:22 AM
random spam is random
 
morning everyones
 
@KarthikKeyan but the repo is already showing code.
 
@Vamsi i can't get clear code..
Dynamic padding height set to the page and make the padding height=0 at page loading time
//padding height
var windowheight = $(window).height();
$(".page1").css('paddingTop',windowheight+"px")


$('.homepage').fadeIn('slow', function () {
$('.page1').animate({
'opacity': 'show',
'paddingTop': 0
},1500);
});
The page little bit shake while moving to top...
 
lol /me stumbles on a SO question
0
Q: you can use dbms get ddl to see

Lay Chrisyou can use dbms get ddl to see

 
:P
 
8:28 AM
@PeeHaa follows oracle tag >.< ?
 
Nope. Just landed on SO through google
 
viral stuff
 
Anonymous
moin
 
Hey james o/
 
8:31 AM
Hey james o/
 
8:45 AM
 
Hello ppl
 
@KarthikKeyan this is a php room, and that is not php code
 
Please see the JavaScript room mate. :P

JavaScript

Topic: Anything JavaScript, ECMAScript including Node, React, ...
I doubt they'd help you though if you just copy paste that code.
Get a JSFiddle first.
Guys, best shared host recommendations?
 
google cloud has 5$/month for shared CPU + 600 mb ram if it works for you ( and if u can set up your server yourself ) otherwise i dont know , amazon should have similar price machine too
 
I kinda like DigitalOcean
But I can't seem to get FTP and Email Working xD
Which is why I want a pre-setup Shared Host.
I want at least 3 domains to be hosted
Kinda $5 ish a month would be boss
 
9:00 AM
@JoeWatkins contact rasmus re. breach
 
o/
 
\o
 
so, how many people here have switched to duckduckgo as the default search engine in past year or so?
 
tried more than once but always went back to google after a while
 
^ that
 
9:09 AM
posted on March 21, 2017

New Cyanide and Happiness Comic

 
only in the last year @tereško?
what about before that?
 
Thank you @Gordon and @Jeeves. Currently, Im almost finished in my autogenerated report. Setting a trend line is what I must achieve that is why I created 2 series for upper and lower limit. if I don't have the ability to make the upper and lower to be in same color, i guess i think i need to say that is all i can do for now
 
@EarvinNillCastillo You're welcome!
CURLOPT_FILE not work in curl_setopt_array – #74280
 
so, is it pretty common to feel that S/O is not this temple of absolutely smart people? I mean, I'm listed as top 3% and 1/2 of that came from telling someone to use true as the second argument to json_decode()
what gets me is the constant up votes it gets. i mean, its correct, but its hardly a rocket science question.
 
Anonymous
@DaveRandom \o/
 
9:20 AM
Hello Guys, Good morning. i hope you're doing well
 
@Stephen the easiest questions usually gets the most rep. has been like that forever
 
that bodes poorly
 
I am playing with magento 2 and let me know who else dealing with magento 2
 
@sagarumaretiya no one with a sane mind and free will
 
lol the way the question is worded is a little telling, but probably unintentional
"I'm playing with magento, who else dealing with magento
its almost like an up front admission that magento will give you nightmares
 
9:22 AM
@Gordon lol :P
 
is magento bad?
 
Sorry guys, I am not native English speaker
Nope, Magento is quite good my friends
But Magento 2 is little difficult to understand
 
Okay, thanks
 
@TheRegister @Scott_Helme SQLi in less than 2 seconds. #boom #headshot https://t.co/EYjWJRdl3Q
hahahahaha
 
9:32 AM
\o
 
o/
Hola seanna paul
 
bebeh gurl
 
!!voting deprecate-bareword-strings
 
@PaulCrovella :D
!!lxr-jeeves rfc
 
9:37 AM
@PeeHaa Nothing went wrong but I couldn't find a suitable definition
[ /src/Plugins/RFC.php#22 ] class RFC extends BasePlugin
• Raise severity of undefined constants to E_WARNING in 7.2, and Error in 8.0? - Yes (38: 100.0%), No (0: 0.0%) (https://wiki.php.net/rfc/deprecate-bareword-strings#doodle__form__raise_severity_of_undefined_constants_to_e_warning_in_7.2_and_error_in_8.0)
‌ ◦ Yes: aharvey, ajf, ashnazg, bwoebi, cmb, dams, danack, daverandom, dm, emir, francois, frozenfire, galvao, guilhermeblanco, hywan, jhdxr, joey, kelunik, kguest, lcobucci, levim, lstrojny, marcio, mariano, mbeccati, mrook, narf, nikic, patrickallaert, peehaa, pollita, sammyk, santiagolizardo, sebastian, subjective, svpernova09, tpunt, yu
 
oh wow that takes some time
 
Jeebus*
 
Anonymous
@PaulCrovella kinda feel bad for them but at the same time.. idiots
 
@JayIsTooCommon Don't feel bad about idiots like that
 
!!issue !!voting - Show a "No Voters" or something similar if no one voted for a particular choice.
 
9:39 AM
 
@Sean Not sure if bug
 
hi there
 
Guess so
 
No idea why it's so slow though
 
Anonymous
@PeeHaa aye, users table is now deleted though. A bit of a cuntish thing to do
 
9:40 AM
@JayIsTooCommon Really?
Yeah that's a dick move
 
@JayIsTooCommon they're idiots, and so is the mob that completely overreacted about it
 
It's a lesson though
 
hi @Gordon , I'm tryin out the "gateways" with php. But I come across this : I have "objects" related to many others, and I think I'll have to "call a gateway from another one", for example, call a "addressGateway" from a "personGateway". Is it good practice to do so?
 
Dropped users table vs exposed passwords
THough you can't guarantee the latter didn't happen either
 
Yeah
Also he was taunting
 
Anonymous
9:42 AM
 
yesterday, by Gordon
@Julo0sS either you inject related gateways or you just do JOINs in your queries. for the sake of simplicity, I'd go with joins
 
@Julo0sS what do you mean by "gateway" ?
 
Anonymous
then again.. you could say whoever dropped it was protected the plain text passwords
 
wait wat
They were also handling cc data?
 
Anonymous
9:44 AM
@PeeHaa ?
 
@JayIsTooCommon Thought somebody said that in the ars comments
 
@Julo0sS in that case: no, it is not a practice and you are approaching the problem incorrectly. Learn how to use SQL JOIN statements.
 
... as Gordon already told you yesterday
 
Anonymous
lordy
 
Anonymous
9:46 AM
> As several commenters have pointed out, the site's subscription page transmits credit card information over plain-vanilla HTTP pages as well. The lack of protection is made worse by the assurance on the same page that: "All credit card information is encrypted using our Secure Transaction Server." Making matters worse still: the login page is returning error messages that indicate it may be vulnerable to SQL injection attacks.
 
I have no problems with sql join statements, just wondering how you/gordon would approach the problem. sounds like you'd go for joins then
 
Can anyone help me with that - how to print on a pre-printed slip with dot-metrix printer using PHP?
 
@tereško that Gateway thingy is also called Data access object in other places
or repository
 
@RaduStefanPopescu no, it is not
 
is it not?
 
9:49 AM
@tereško if you'd end up with lots of duplicated queries, it can be okay to inject a gateway or create aggregating Gateways instead of using joins, but yeah… joins are simpler most of the time.
@RaduStefanPopescu no, it's not. DAO in Java uses inheritance
 
@Julo0sS I would make a separate gateway that deals with those relation-issues. You could look at it as "gateway made for SQL view", since the views can bw main with joins.
 
user6845426
Hi guys
 
@ShailParas from a web page ?
 
@Vamsi Yes from webpage
 
@Gordon this was the main problem I came across, for now i have multiple tables/objects that interact together. And here, in my simplest example with address, I'll write join queries that I'll have to rewrite (not completely but almost) in other gateways... thanks anyway :)
 
9:52 AM
@Julo0sS a good question to consider is whether you ever will need these data sets as seperate sets or whether they will always be used together
 
@Julo0sS this is why I tend to go with Data Mappers instead. Less confusion.
and as I said, you can look at JOIN queries as "sql views"
 
well, for example, an address can be retrieved/edited without a person, a town can be retrieved/edited without an address, and so on...
 
@ShailParas use custom CSS
 
@Vamsi - actually i have created pdf file for it but padding and margin not working in it.
 
since the and you can extend the "table gateway" to also encompass the views ... basically, you write a different gateway for each table or each view and have it contain methods for adding filters/conditions on those tables and views
 
9:54 AM
good advice ^
 
@tereško not sure I really get what you mean... :/
 
do you know what SQL VIEW is ?
 
yes
 
user6845426
I'm trying to look into XML/JSON for examples of when I'd use it in my web app as opposed to just quering dbs. I can't see any real benefits to using xml/json. Can someone point me to some good literature
 
what I don't get in your post is "have it contain methods for adding filters/conditions on those tables"
 
9:57 AM
damn, I should be going to work right about now
.. ok ... gonna try to explain this as simple as possible
 
for now, I started writing a gateway for each table/view, and thought it would be easier/faster/better to inject/call related gateways...
 
say you have a PersonDetailViewGateway which uses Customers, Addresses and SomethingSomething. Now you want to query it for all Persons living in City X so you add a findPersonInCity()
 
should I repost this on stackoverflow ? dba.stackexchange.com/questions/139511/… . had even offered bounty
 
moagain
 

« first day (2348 days earlier)      last day (2599 days later) »