« first day (2364 days earlier)      last day (2598 days later) » 

2:00 PM
@ircmaxell Not to test for skill, just to test if they can program.
 
unless you're remote
 
talk through problems, and work collaboratively on higher level problems. You'll get a better idea of their abilities
 
@Leigh I am, most of the company is
around 3/4 of the company is, I'd say
 
@Sean it doesn't tell you that though. A real-world takehome might, but something they'd never code int he real world? nah
 
Anonymous
i like the thought of refactoring being part of the testing process
 
2:01 PM
@ircmaxell that's for people, that can do a "hello world" level exercise
 
Yeah, I get that. I do explain it up front that they won't be judged on their approach, it's just a screen to see if they can write code
 
@tereško I don't give takehomes in most cases. I'm just saying if you want to know if they can program, asking them to do a teaser like fizbuz doesn't tell you that
 
@ircmaxell still, I expect a coder to be able to write fizzbuzz. Even under stressfull conditions.
 
Behind the scenes it's also just to see how they react to a menial task if they're more than capable, because there's a lot of them.
 
@FlorianMargaine I don't hire coders. I hire engineers. Those who can reason about problems and discuss them, and understand not just how to implement an algorithm, but how to understand the problem to determine if an algorithm is even necessary in the first place
 
2:03 PM
@ircmaxell it depends on the skill level. Again - fizzbuzz is just fine for when you are trying to find a junior dev
 
@ircmaxell I hire engineers who can code.
 
meh
 
sorry, but fizzbuzz is just a minimum required
 
FTR not one applicant has passed all the unit tests, but we've been more than happy to recruit them. @Florian is right, it's just a minimum bar.
 
Also depends on the company, Anthony, the kind of companies you work for are worlds apart from agencies that spew out wordpress sites. If you're hiring for a high turnover low-stimulus role, I'd probably go with basic tests too
 
2:05 PM
@Leigh we're not that kind, we don't do fizzbuzz though
I'm not sure I like our interview questions though to be fair...
 
With tuning for everything inbetween
Some developers we hire here have to do tests, some don't, I guess it depends how you carry yourself during the phone interview and the level you're applying for.
 
we have some questions like "here is a piece of relatively simple code, tell us what happens, is there a bug, how to fix it?"
then open-ended questions about general stuff like TCP/IP or various technologies related to our job
 
@FlorianMargaine Same, it's an ongoing process to get them right. Interviewing is difficult :<
 
I'm just telling you, with a decade of interviewing experience and having tried all of those tests, I've moved past them and get far better candidates and hiring because of it. If you want to do a "programming test", sit down and have an engineer pair program with them something realistic (adding a small feature to a simple application)\
 
like "what happens when you enter google.com in your web browser bar?"
 
2:07 PM
I'm not in the game of shaming applicants, so I try to find out their general level of expertise and use questions to slowly find out what they know on top of that.
 
hi guys im having some problem with a date/logical problem, on a system where you cant schedule backups, but creates daily backups, how do you continue to delete backups where you eventually have 2 weeks old, 1week old and a daily backup
 
The downside is they might know a lot more than what I judged them on, but I don't know because I never asked them about it.
 
pastebin of what im trying pastebin.com/bGahQfzP
 
@Sean yeah, the trick is about asking open-ended questions
 
How does saas application handle the db structure,do they create one db per user?
 
2:11 PM
that depends.
 
@user7594714 That's a bit.. vague. Depends on the SaaS I guess.
 
Q: How can I launch non-blocking HTTP request with "native" PHP functions (not cURL)? I'm more stupid today than usual :-) Thanks
 
@DejanMarjanovic artax
 
so... im guessing that what im trying to accomplish cant be done without schedules?
 
@FlorianMargaine I know, but I just need "one-liner" if possible, it's for a small script
 
2:17 PM
@DejanMarjanovic ...
 
@DejanMarjanovic then just use curl?
 
lets say wordpress in saas form, by that I mean saas application that allow you to have user that can post content.
 
wordpress saas already exists
:P
thank you thank you
 
lol
 
2:19 PM
it was just an example
how would it handle the db structure
 
e.g. table prefixes
 
Why would saas be different than any another application?
 
but multiple databases is easier to scale
 
You can have client specific things in normal applications too
 
it really depends on your application.
 
2:20 PM
^ that
 
lets say wordpress in saas form, by that I mean saas application that allow you to have user that can post content.
 
Still too vague
 
yeah, it depends.
 
"content" doesn't say much
 
@ircmaxell maybe if you're bored, could you check to see if I'm talking out my arse? github.com/thephpleague/oauth2-server/issues/…
 
2:22 PM
saas product -> allow users to have a website -> which allows the user users to post stories
 
Just have a site id column
But it really depends
 
@user7594714 WP MU?
 
And probably only you can answer it because only you have all the specifics
 
I'm old.
 
@littlepootis its just an example
 
2:24 PM
@Leigh make something pinnable
 
@user7594714 maybe this what you want? premium.wpmudev.org/blog/…
 
@PeeHaa wouldnt it cause the db to be too big and wouldnt it be a security concern
 
@user7594714 Why would it?
 
@grasshopper again it was just an example
 
@ircmaxell found a new role yet ?
 
2:27 PM
@PeeHaa every site would have hundreds of post and then thousands of comments and wouldnt the db be extremely slow?
 
Why would it?
 
because of the huge amount of records it would have
 
@user7594714 What do you think is huge? Do you have an actual problem or are you blindly assuming things?
 
I dont have a problem, im just trying to figure out how they handle the db
saas products handle the db
 
@user7594714 that is what indexes are for
 
Wes
2:30 PM
n\o\ons
 
10 mins ago, by PeeHaa
Why would saas be different than any another application?
 
by saas products I mean cloud applications
You get what I mean
 
No I do not
 
Dont have to overcomplicate it
 
@user7594714 i worked on a saas app, and i dont see the need for seperate dbs, especially if the seperate instance have to use shared data
 
2:34 PM
I consider myself a cloud application
 
clod*
 
Mornin'
 
@user7594714 cloud is a nonsense term saying exactly nothing
 
ormin
 
@Trowski yo
 
2:35 PM
But you know what Im referencing to
 
@kivlara Let me know if the update I recently pushed to Coroutine solves your memory issues.
 
I have no idea
 
So it is saying something
 
And neither do you (I think)
5 mins ago, by PeeHaa
10 mins ago, by PeeHaa
Why would saas be different than any another application?
 
@Trowski Sure, Thank you
 
2:36 PM
can anyone please check my initial question, i know im being stupid, but i just want to confirm that if its possible or not
 
serverless: an architecture that uses more servers than you can shake a fucking stick at
cloud application: an application deployed to a serverless architecture
 
lol
@grasshopper how are the backups started if you can't schedule them?
I am really trying to help you @user7594714 not by attempting to give an answer I cannot give, but to let you realize what you are actually need to be looking at
 
I guess
 
I dunno man, I could shake a stick at a lot of servers
 
serverless uses more
 
2:40 PM
Might even hit some of them
 
@Leigh eeeeew
 
@user7594714 I've been involved with websites with databases containing over 100 million records in a table, and it was not slow. Stop worrying about things you shouldn't be worrying about.
 
I can top that with 800m, and it was slow as hell :D
but it wasn't my db
 
Lets say its like reddit and allows you to create subreddits and those subreddits have posts and posts with comments. Would using one db still fit?
 
Do you have a reddit yet?
 
2:44 PM
urm ... I've worked with library of congress data
 
Also doesn't reddit do postgres mostly?
 
@user7594714 Unless you have a site like reddit, "one db" (guessing on what that really means, since that's pretty vague) is probably fine…
 
They won't have a db / table per sub I assume
 
@user7594714 why not?
 
Idk im just trying to understand how big application handle their db structure
 
2:46 PM
They start small
 
boom
 
@PeeHaa I wouldn't think so… though they might divide subs into groups, each stored independently.
 
it can make sense to use more than one database
but you don't start out that way
 
By the time you reach that point you can hire one of these filthy dbas anyway
 
yeah, you will have too, it gets extremely complicated ... each engine and server having characteristics you only know about if you have worked with them at extreme load, I mean very very extreme, as extreme as you can imagine ... you don't need to know about it before then, and when the time comes, you definitely need a dba
 
2:49 PM
moin
 
o/
@JoeWatkins I am agree
 
Good news: All exams over for now. Bad news: Still no time, because holidays.
 
I guess you guys are right
 
@JoeWatkins What's the state of green threads?
 
2:52 PM
better than it was last time someone mentioned it, but not usable yet ...
oom and strangeness with simple code, haven't quite figured it all out yet ...
never actually used context manipulation functions ... it's quite complicated to debug ...
 
@user7594714 We started with a relational DB, and as that got huge and we saw which parts were getting accessed thousands of times a second, started porting those to in-memory and NoSQL solutions
 
one of the main drivers to split data, into nosql, or anysql, is concurrency issues ...
 
We still have the contents of the NoSQL stuff available in the relational DBs as cold-storage, so we can check its integrity and regenerate it as needed, though
 
I super hate big data applications, for the record ...
 
@JoeWatkins We have a thing that uses 40 servers to do so much stuff that, in terms of CPU time, adding 1 second to the procedure on average is approx 1.5 CPU days. That's where we start moving stuff out of relational
 
2:54 PM
@Dereleased so you just save regularly used data in session and refresh when needed?
 
@grasshopper Our UI uses some caching to session access tokens to keep auth fast, but the sessions themselves are in the relational DB. Our UI is not where we do our heavy lifting (we're SaaS)
 
saasy
 
Evenings o/
 
There's been talk of putting the sessions in the cache but that requires more than we're willing to spend, dev-time wise, to make sure we can still have user-level changes reflected instantly in the user's dashboard
 
@Saitama \o
 
2:58 PM
something something, hardest things in programming, something something, cache invalidation, something something ...
 
@Dereleased well i dont know, but seems your saying something complex like "in-memory and NoSQL solutions", when its just basic storing stuff in session and refresh from db when needed, or am i missing something
 
gawd, I hate homeworks... especially history ones >.<
 
if I never have to try to analyse a couchbase cluster again, it will be too soon ...
are people still using that ?
 
Are the "Class::static_method", ["Class", "static_method"], etc. documented somewhere? Edit: php.net/manual/en/language.types.callable.php
 
it's an awful place to be ... I hate spending more time discussing configuration, and then configuring than I do coding, or watching nice graphs (of how much money you made today) ... that's what big data is too me, endless fucking about with configuration ...
 
3:01 PM
@grasshopper Our UI and per customer stuff is not a choke point. User stuff stays relational cause that's where it needs to be. We have huge chunks of global data that are read, and this is not exaggerating, millions or billions of times more often than they are updated, and that is what goes into in-memory/nosql
 
@Dereleased what is memory/nosql is that not a php session?
 
@grasshopper No
 
!!wiki nosql
 
A NoSQL (originally referring to "non SQL", "non relational" or "not only SQL") database provides a mechanism for storage and retrieval of data which is modeled in means other than the tabular relations used in relational databases. Such databases have existed since the late 1960s, but did not obtain the "NoSQL" moniker until a surge of popularity in the early twenty-first century, triggered by the needs of Web 2.0 companies such as Facebook, Google, and Amazon.com. NoSQL databases are increasingly used in big data and real-time web applications. NoSQL systems are also sometimes called "Not only...
 
@Dereleased ok i think i understand, so you store most used records in faster type db
 
3:04 PM
@bwoebi Is it safe to ignore UV::EBADF (that is, treat it like 0 was given to the callback for $status here) and invoke the watcher callback? It seems like this may be happening if the descriptor is closed before calling uv_run() but after creating the event with uv_poll_init_socket().
 
@grasshopper Right. I wasn't trying as much to delve into our specific business practices, just give an idea of how we grew. We started out with a relational db for basically everything, and we've been replacing it in places where it is inefficient, or just plain wrong. E.g., data that is global and needed across hundreds of servers, and situations where we originally made stupid mistakes like using a relational db like a queue
 
@Trowski does this only ever happen if you manually fclose() the resource?
 
@Dereleased thanks, you teach me something :)
 
btw, quick question, @JoeWatkins: is the electrical network in UK using the same standards as in the rest of Europe?
 
@tereško hehehehe
 
3:07 PM
well ... aside from the plugs
 
@bwoebi Not entirely sure, it came to my attention through this issue.
But it does happen like you described after calling fclose().
 
@Trowski If that's the case I'd qualify it as user error as they then forgot to unregister the watcher
 
@tereško Yes afaik 230/50
 
instead of 220V ?
 
Not many countries have 220
 
3:10 PM
@bwoebi Looking at the code he submitted with that issue, it appears the watcher is being cancelled. I'll have to look into it further.
 
AFAIK it's mostly 230 / 240
!!? countries with 220 power grid
 
Search for "countries with 220 power grid" (https://www.google.com/search?q=countries+with+220+power+grid&lr=lang_en)
• Mains electricity by country - Wikipedia - Mains electricity by country includes a list of countries and territories, with the plugs, voltages… (https://en.wikipedia.org/wiki/Mains_electricity_by_country)
• Complete list: Plug, socket & voltage by country… - 22 jan. 2017 - Whenever the electricity situation in a country requires additional information, the… (http://www.worldstandards.eu/electricity/plug-voltage-by-country/)
 
whats amphp/amp used for, someone can give me the dumbed down version
 
@grasshopper A non-blocking concurrency framework for PHP applications
 
3:18 PM
@grasshopper think node.js, but PHP.
 
@PeeHaa ajax for server ports?
 
nothing to do with ajax......
Just asynchronous server side processing.
 
@Wes Why down instead of up that arrow?
 
@grasshopper Just the first letter of ajax
 
Wes
@kelunik because up looked bad
 
3:20 PM
@Danack can you give me a real world example, it will help me understand better
 
@grasshopper Let say you are making a request to a website
That takes time right?
 
yup
 
What if you can do other stuff while you wait on the response from the site
 
@grasshopper the home page has examples amphp.org
 
searching for some pr0ns?
 
3:22 PM
ok that would be cool, i see lots of scripts hanging for 5m+
 
...
@grasshopper then you don't need asynchronous processing, you would need background processing tasks.
Feb 25 '16 at 2:00, by Danack
As Paul said, even for a web application - all the threading ought to be on a background worker process imo. And I really doubt there are any legitimate applications where there are requests that take longer than 100ms. If data needs to be pulled from a slow data source, a placeholder that displays a 'loading' page or widget, and then checks whether the data is available through new requests, is far nicer than having slow requests.
amphp is about scaling to thousands of fast requests per second, not about managing long lived tasks.
 
@Danack Both.
 
@Danack If you have many long lived tasks to manage, it may be worth again to employ amp...
 
@PeeHaa Nigeria
Well, maybe all former British colonies - maybe
 
Anonymous
@Wes you're not just a pretty face
 
3:27 PM
ok so for example i have a function on a crontab that runs lets say 12 other long processing functions, what should i do to make it into a "background processing tasks"
 
@bwoebi the only ones I currently have, segfault when they fail, as imagick shits the bed....so probably aren't suitable for amp.
 
Wes
@JayIsTooCommon i don't like it :B
 
@Danack yeah, imagick… isn't well known for it's stability somewhat
 
@grasshopper those are background processing tasks. (although managing them with supervisord is a lot nicer).
 
Wes
made in 10 min. i didn't have better ideas
 
Anonymous
3:28 PM
 
@JayIsTooCommon eek
 
The point is that you don't need to leave HTTP requests open while the work is done. You can just return a 'job id' or similar to the client that initiated a piece of work that takes a long time to process, and have the client call "is this job done yet"?
 
Wes
also this github.com/belanur/phpunit-logo/raw/master/suggestions/whitingx/… wouldn't be bad if i could identify the logo. do you have any idea what that is? :B
 
Anonymous
@Wes I was just about to say that :P
 
@bwoebi I'm not crazy, I swear… :-D Is there something going on with how PHP is garbage collecting that I'm not understanding?
 
Anonymous
3:30 PM
You can do better than that though..
 
@Danack github.com/supervisorphp/supervisor this one is correct as example?
 
@Trowski I just was talking about the code by @kivlara … for the general case you sure are right.
 
@grasshopper yes, though you don't need a front end to it. You can just start installing just the supervisord.org bit.
 
@Wes Think it is supposed to be a unit square, or cube in this case
 
@Trowski @bwoebi Started server about 1 min ago, right now connected 16K users, waiting leaks ..
 
3:34 PM
@bwoebi Ok, good, I feel better now, lol. @kivlara apparently wrote some code where he was running out of memory before the coroutines were destructed.
 
Wes
@Orangepill oh
 
i go buy cake, bye
 
@Trowski sorry for making you doubt yourself ;-)
 
It's a stretch.... I personally like the first one
 
Anonymous
beat them @Wes
 
Wes
3:35 PM
lol
why don't you submit something too?
 
Oh, I'm always doubting myself, probably more than I should sometimes…
 
@Trowski for making you unnecessarily doubt yourself ;-)
 
hehe
 
Anonymous
@Wes at school, my art teacher told me that I must do my homework on ms paint, as I wasn't good enough at legit art. She still laughed at my ms paint homework... So i became a programmer.
 
Wes
@JayIsTooCommon i should probably make a blue one
 
Anonymous
3:38 PM
if only that old saggy bitch could see me now.
 
Wes
people hate non-blue by default
 
Anonymous
She'd still laugh
 
Wes
nobody is that bad
 
@JayIsTooCommon She'd probably say your code was too derivative.
 
Wes
lol
 
Anonymous
3:40 PM
:P
 
Wes
can i commit to an existing pull request, right?
 
@Wes Yep, just commit to the same branch.
 
Anonymous
yeah
 
@Wes You can even force push the branch to clean up history.
 
3:47 PM
@Trowski Or that it insists upon itself.
 
Anonymous
@Wes i'd lose the bubbles and the down arrow - think he already rejected one on twitter because it had a red tick
 
@Wes Some separation of php and unit would help. Obviously not space, so maybe just a harder color transition between the letters.
 
Wes
i'm not satisfied by it at all
will try something else tomorrow
 
Also to echo some others, the arrow should be flipped 180°.
 
Wes
i couldn't position it. the T looked bad
i have another idea though, will try it tomorrow. now groceries :B lata
 
Anonymous
3:55 PM
grocery shopping must be so easy in Italy..
 
I was just building PHP, and all my .o files ended up in a .libs dir, so now the sapis (well, cli at least) won't compile because it can't find the .o files; how do I either not build them in .libs, or get it to use .libs?
 
@bwoebi Regarding the issue I mentioned before with the UV driver, the only reason I can see to change it to invoking the callback and ignoring UV::EBADF is consistency with how libev and libevent seem to handle close sockets.
At the moment it seems the only reason it happens is because fclose() is called on a socket with an active watcher.
 
4:10 PM
In this case I think it's fine to leave as is … I'd love if libev(ent) could then error out too if possible?
 
Short of checking every descriptor manually on each tick, I'm not sure that's possible.
 
it was --with-enbed in my configure line that did it. So, I guess if I compile for embed I don't get to have anything else, and need to disable the other SAPIs?
 
How secure are environment variables for storing mysql passwords?
 
https://dev.mysql.com/doc/refman/5.7/en/password-security-user.html

> This method of specifying your MySQL password must be considered extremely insecure and should not be used.
 
@Dereleased I was talking about using environment variables for Apache and PHP?
 
4:22 PM
The reason it's insecure is because of methods of inspecting environments
 
What's your preferred way of storing mysql passwords?
 
shared hosting, or something you control?
 
Something I control
 
Phar::__construct : undocumented parameter – #74386
 
1) make sure your db user is restricted to localhost (if it's the same box as the application) or e.g. 10.% (if you have a few boxes on a local network).
2) follow the link I posted earlier and look into creating a `.my.cnf` file with the login credentials in the home directory of the web server user. Read all its directions, especially with regards to setting permissions on that file to `0400` (owner-only read-only) or `0600` (owner-only read-write)
 
4:28 PM
How would php call them?
 
I believe you just pass an empty string, or maybe null, for the password (and possibly user if specified in .my.cnf)
 
Basically, put the file far away from your web root, and make it only readable by the web server's running user. Whether you use a mysql mechanism for specifying the default password, or just read that file, as long as it's a long way from the web root and can't get dumped by any means, you'll be in better shape than e.g. storing it directly in a file residing in the web root
 
but what about environment variables?
 
xbox scorpio ftw!
 
4:48 PM
!!lxr phar
 
No records returned for lxr.room-11.org
@PeeHaa Totally failed to get a valid results page
 
cc @DaveRandom ^
 
5:09 PM
!!cancer
 
> ♋ Cancer | June 21 to July 22
Remember: Sometimes in life you just have to roll the dice, move your wheelbarrow to St. James Place, and pay the $70 dollars in total rent.
http://www.theonion.com/features/horoscope
php-cgi process leaks memory after killing script due to max_execution_time – #74387
 
5:25 PM
hello
anybody here?
I've stuck in codeigniter please help me
 
delete it
 
Anonymous
@AnkitGupta if you can generalise your issue to PHP, someone might be able to help you. Otherwise, you won't get much codeigniter help here.
 
5:45 PM
@Trowski @bwoebi @kelunik ping, Probably memory leak: patch: github.com/umbri/amp/blob/master/lib/Failure.php#L35-L38
 
@kivlara where exactly does that leak memory?
 
@bwoebi
$this->exception = null;
 
@kivlara onResolve() may be called multiple times
 
@PeeHaa @tereško yeah, 240v
 
@bwoebi, hm ... I get constantly increase of \Amp\Failure objects, very strange
 
5:56 PM
0
Q: Display data from 2 tables in CodeIgniter View by data dependency

Ankit GuptaI'm new to CodeIgniter, I'm working on a project BeautyApp , I need that , If click on a surgery , then all the clinics should be shown , with related surgery. my table name is "clinics" and field by which clinics to be filtered is "clinic_surgries" please help me guys. my view code is <?php ...

 
@kivlara but that for sure is not the issue
 
so why I thought there is the problem
 
I don't have idea how should I make controller for my query
 
https://stackoverflow.com/questions/5863870/how-should-a-model-be-structured-in-mvc/5864000#5864000
https://stackoverflow.com/questions/16356420/mvc-for-advanced-php-developers/16356866#16356866
 
Do you have a question?
Because you have written "I dont know what to do, please help" ... and that's not a question.
 
5:58 PM
@Dereleased I don't think anybody using CI has any use for those links
 
@PeeHaa Well if they take tereško's first piece of advice they will help
 
@AnkitGupta let me guess, you got a job on odesk and now you just realized that you don't know how to actually do it?
 
not actually this is my past project , due to my employee I got a review from client , and now my employee leaved my team
 
@AnkitGupta sounds like you should hire a new employee who knows how to program instead of trying to do it yourself
 
^ that
 
6:03 PM
I need to do just one query only, for that I can't hire someone
 
@AnkitGupta then hire a freelancer... We are not going to work for you for free
 
@bwoebi I use something like
 
evenin
 
function test()
{
    $promisorResponse = new Deferred();
    $promisorWithTimeout =  \Amp\Promise\timeout($promisorResponse->promise(), 2000);

    $promisorWithTimeout->onResolve(function (\Throwable $error = null, $result = null)
    {
        unset(self::I()->callbacks[$uid]); //array with Deffered
    });

    return $promisorWithTimeout;
}
Can be something here wrong ?
 
@Patrick Reminds me of an old image macro I used to see in "Please photoshop X" threads: "This is not a store, we are not your slaves"
 
6:10 PM
@bwoebi and leak is only when fail \Amp\Promise\timeout promise
@bwoebi any suggestions ?
 
@kivlara Is the promise you're putting a timeout on never resolved?
And are you holding onto a reference to that promise somewhere?
 
where self::I()->callbacks is a global array
 
How are the callbacks in that array created?
 
@Trowski
        $promisorResponse = new Deferred();

        $uid = uniqid();

        self::I()->callbacks[$uid] = $promisorResponse;

        $promisorWithTimeout =  \Amp\Promise\timeout($promisorResponse->promise(), 2000);

        $promisorWithTimeout->onResolve(function (\Throwable $error = null, $result = null) use ($uid)
        {
            unset(self::I()->callbacks[$uid]);
        });
 
6:45 PM
@bwoebi How often is gc_collect_cycles() effectively called by the engine?
 
@Trowski every time the root buffer is full (10k elements)
 
@kivlara The code you have does "leak" the failed deferred from Amp\Promise\timeout(), but it is destroyed when cycles are collected. You can see this happen by manually creating a timer that calls gc_collect_cycles().
 
@Trowski omg, Thank you.
@Trowski Is this a normal behaviour for amp ?
 
Matka.net – #74388
 
@kivlara Normal if you have a promise that is never resolved in a circular reference. I'd refactor the code to avoid that.
 
6:53 PM
How nice spam that cannot be removed :P
 
@Trowski Thank you, refactoring ...
 

« first day (2364 days earlier)      last day (2598 days later) »