« first day (3260 days earlier)      last day (1682 days later) » 

1:27 AM
We interviewed someone today for a php position.. the guy had 3 years php experience. At first the guy kinda sounded like he knew what he was talking about. He even used the buzz word "mvc pattern" at one point. But as we delved deeper into any subject he didn't have any idea how it worked.
Eventually I asked him what an interface was.. he was like "Yeah I've used them before, they're like mini controllers"
We all just went "Oh okay..." And ended the interview there lol
 
@Danack lol'd at your reply to C
 
1:48 AM
\o
 
2:40 AM
@MarkR ha ... free time ... very funny ...
I got a better idea ...
It should look like this
now you do the review, spot the difference and if you can't figure out why, ask and I'll tell ...
you know I review code all day, it's like more work ... I don't mind, but I'd rather teach if possible, thought this might be more fun (for you) ...
diffing the diffs isn't cheating in any way, you should do that, but I wanted you to have the whole thing to build ...
diffs of diffs aren't very easy to read either ...
 
 
3 hours later…
5:32 AM
morning all
 
5:53 AM
moin
 
6:03 AM
Was thinking today but not sure if it's true for sure. In current RFC process internals opinionated comments lead authors to doubt in their proposals. I was looking for constructive criticism rather than discouraging others and author to contribute.
Comments like I don't like it, don't like syntax, won't use it are not constructive and not helping in any way.
Maybe just my proposals are not good enough for the language.
Or maybe I cannot express and defend it in a good way.
What I would like to language to evolve. Git a bunch of ideas which IMO could work nicely without any BC breaks. But also could only try to propose them one by one in single RFCs. Loosing big picture.
Ahhhh... I'll better stop complaining here.
 
@Gordon o/
 
6:23 AM
@JoeWatkins Looks like you just renamed a function or two to me.
 
6:43 AM
which is the best way to send multiple emails in the background?

php-fpm, thread or any?

I follow this link: https://stackoverflow.com/questions/36540651/making-phps-mail-asynchronous
 
6:54 AM
@NishargShah a job queue is a good way to handle background tasks. Qless, Gearman, etc are options. Or if your needs are basic, a timed job (eg. via cron or system timers etc) can check for work on a regular basis.
 
Ok thanks
 
7:40 AM
@Stephen Got my email, right?
 
Shutdown functions are not called when exit is called from output handler – #78565
 
morns
 
morning
 
@Derick yep, will get back to you about it today, thanks!
 
+1
 
7:55 AM
huh. what am I missing here?
PHP_FUNCTION(imap_lsub_full), PHP_FALIAS(imap_getsubscribed, imap_lsub_full, arginfo_imap_getsubscribed)
and yet imap_lsub_full is not a function in, and imap_getsubscribed doesn't show as an alias
weirdly the 'proto' comment (which is just used for generating docs, isnt it?) shows it as imap_getsubscribed too.
 
issuable open to contest, debate, or litigation
 
Bad choice of word for php internals
 
oh.. there's no corresponding PHP_FE call for lsub_full, just the alias call. Who dares to say php has confusing function names
 
8:11 AM
@MarkR look closer :)
 
I saw you moved the typedef inside the C then had to bodge getting the image pointer by using void* and then casting inside the gd_icx.
 
and changed the order of members in the object, and changed all the RETURN_OBJ, and allocated the object properly ... the void cast is fine, the cast function is not exported, and it's better than having the structure in a public header
the php_ prefix, and _fetch suffix is idiomatic for extensions, but naming is not super important whatever ...
krakjoe@fiji:~/php-src$ ls /opt/include/php/ext/gd/php_gd.h
/opt/include/php/ext/gd/php_gd.h
in case not clear ...
 
Well I was basing it on the XML library as suggested, which makes no mention of the additional properties and such. So you might want to pass an eye over that :-)
 
reviewing every extension is a headache, I can do more words and explain why I done that stuff ...
 
Sure, I'm just saying where I derived it from, if that source is wrong then I won't use it as a source of information.
 
8:21 AM
well, wrong is a strong word ... I'll do words, give me a minute to get them out ...
the object needs to be last in the case where the object may have properties or use guards (doesn't need explain right now further than guards are allocated in same space as inline properties), not using properties right now but there exists a compile flag that forces the allocation of guards, extensions may use that to perform dark magic ... since this is new code, and since you want the flexibility of being able to add properties and an OO api without breaking the ABI, you want them
in the correct order now
I'm sure you get why/how the cast is working, and the return_obj was just not necessary, you are already passing the return_value to the constructor routine ...
I wouldn't call code that doesn't look exactly like this broken, not necessarily ... it may not be fully compatible with extensions or forward compatible ... but we're adding new code and the considerations are somewhat different ...
</words>
 
I get why/how the gdImagePtr cast is working, what I'm not following is why the struct that contains it, and potentially other things in future, needs to be private.
If it was just relevant to one file I would understand, but it isn't, so I don't :-D
 
oh that's just convention, we like to only expose what we must ... for example a closure is a core object, but the typedef is private
you know the context stuff doesn't even belong in it's own file ...
 
cmb
@Stephen, When there's no more room in PECL, then the dead will walk php-src ;)
@MarkR, we can easily change anything private without BC concern
@JoeWatkins, the XML objects are new in PHP 7.4, so if there's something to improve, the right time is now :)
 
it's all a bit of a mess ... nobody is going to refuse it if you add another file to put one typedef in, it just seems unnecessary to me ...
 
Maybe I'm just not following the toolkit, I'm only really used to VC++. I thought that the only way it could be accessed was by explicitly including the gd objects header file, but from what I'm hearing, that's not private, so is that header being gobbled up somewhere I don't realise?
 
8:29 AM
if it's not installed it is private to the extension
#include "gd_ctx.c"
burn that shit with fire, just merge the files ... that's horrible ...
this is a created problem, the problem goes away if the files are merged, and they clearly should be one file ...
 
heh, I didn't even see that bit, I thought it was compiling it as a separate object
 
cmb
@MarkR, yes, please inline gd_ctx.c; ideally in a separate PR
 
Okay, just still trying to get my head around the rest of this stuff. A 4200 line C file isn't my idea of a good time ¬_¬
 
never open zend_vm_execute.h
krakjoe@fiji:~/php-src$ cat Zend/zend_vm_execute.h | wc -l
62212
 
Is that generated from other files?
 
8:38 AM
yeah, zend_vm_def.h
we don't edit it at all, but we do read it because debugging ...
it takes long to load ...
 
I'm assuming that the reason that the reason zend_object has to go at the end is so pointer arithmetic can be used to find the zend_object_properties_size(class_type) section?
and the reason xml doesn't do it is because it doesn't have any (like gd)
 
21 mins ago, by Joe Watkins
the object needs to be last in the case where the object may have properties or use guards (doesn't need explain right now further than guards are allocated in same space as inline properties), not using properties right now but there exists a compile flag that forces the allocation of guards, extensions may use that to perform dark magic ... since this is new code, and since you want the flexibility of being able to add properties and an OO api without breaking the ABI, you want them
it's reasonable to ignore the order requirement for objects that will never have properties ... these things might in principle have properties added ...
(closure ignores order)
 
Is the flexible order a new requirement in 7.x? The docs I have from 5.x phpinternalsbook.com/php5/classes_objects/… mentioned that zend_object always had to be the first
 
yes, it's new for 7
lxr.room11.org/xref/php-src%407.2/Zend/zend_types.h#341 that's "the struct hack", this allows us to allocate the zend_object and memory for properties (and slot for guards) in one allocation, it's the same hack we use for strings that allows us to allocate the zend_string and the memory for the content of the string at once ... (this has boring consequences beyond reducing allocations, which make awkwardness worthwhile)
php5 didn't do that, I think it was some sort of ruby clone ...
 
8:55 AM
Don't suppose there's a dark_arts_of_php.pdf anywhere that has all this is there?
I'm piecing it together but would rather not constantly badger you and others for information
 
@MarkR yeah, I'm not always sure either, then I just start looking at existing places where such things do already happen
 
@MarkR this was much more fun than just doing the review of the patch though, right ?
there isn't really a complete source of information anywhere, except in a few heads ... it's cool, nobody minds being asked questions ... we're hanging around on stackoverflow ...
 
Morning
 
It was certainly more informative :-) Fun wise... will get back to you on that. I miss C++ :P
But I do appreciate your time.
 
it was more fun for me ... and that's what matters ... me ...
I feed off the eureka moments of others, like a sort of eureka moment vampire ... you don't get that with github actually ...
moin
 
9:06 AM
@MarkR question are you making the GD objects final or not?
 
Yes @Girgias
 
\o/
 
Mainly because I don't want anyone to be able to **** up the pointers. It seems sensible to prevent userland from creating incomplete objects.
Sooo I think I need to install a constructor that throws an exception too.
 
Yeah, I'd wish most of PHP's extension objects would be final but oh well
 
I was quite surprised to find that internal classes were constructable and clonable by default.
 
9:11 AM
it's a bit disappointing to convert these things to objects and not take the opportunity to introduce OO apis ... what exactly is the point of that ?
just so you can type hint for a few more types ...
 
And they usually hide bugs too, IIRC there was a bug with PDO when you cloned it (duh)
 
ThW
@JoeWatkins Well the objects break BC (minor), adding APIs to them does not.
 
It's a really tiny and specific BC break
 
well if they are implemented correctly now anyway ...
 
No idea Joe, someone said they wanted the extensions moved from resources to objects, so that's what I'm doing. I might look into the ZPP for method parser and see if that offers anything useful for potential OO
 
9:13 AM
Well that would have been me
 
no matter the BC break if it breaks ABI it can only happen at the next minor boundary anyway ... why not do it all at once ...
 
@JoeWatkins the type info is useful info..... but unless people are going to be using inheritance to override some of the methods, then converting the api into an OO one doesn't seem to provide that much benefit...
 
But I do agree with Joe that having an OO Api would be good, even if it needs to be side by side for a while with the procedural one
 
well, with talk about an OO GD API, I sort of expect GD\PNG, don't you ?
we're just getting some sort of dumb replacement for the resource that doesn't seem to provide any real benefit or take advantage of the fact that it's an object now ...
 
ThW
True, but it is work, and the different OO Apis can slowly be added and extended over time. It takes away pressure.
 
9:16 AM
Other than autocomplete being lovely, exactly what benefit would there be for having the possible functions be methods, rather than functions, for a case where people aren't going to be providing their own implementations?
 
I guess it depends what you consider a step forward ... this looks like a step sideways while falling slightly forward ... which is really quite an odd way to move around ... but I'm no dance expert, whatever ...
 
ThW
And the OO API could be implemented Userland first
 
@ThW oh, that. which also allows for BC breaks in the underlying API that could be shimmed over in an OO layer.
 
@Danack let's take the group of people that are going to get the most out of any change, that's heavy users of gd, some sort of image manipulation thing, just being able to tell a png apart from a jpeg is a massive win for them and I think they will expect it when they hear that gd images are objects now ...
also why wouldn't people provide their own implementations of output functions, or any method, I'm not sure about that ?
 
I'm really not sure about that. In that trying to have one class per image type sounds like a lot of complexity, that doesn't add much value. It'd certainly not be a good fit for Imagick: phpimagick.com/Imagick/queryFormats
 
9:21 AM
@JayIsTooCommon Count me interested, for sure. Can get like a £60 easyjet flight over on the day before if I leave the day after the event
 
@Danack oh ... I dunno much about images, aren't a lot of them variations of some format ?
also gd has like 5 ...
 
They all end up as bitmaps internally anyway no?
 
Gosh talking about images it remembers me my side project of trying to implement a pure PNG handler in PHP, and then to do that I started trying to reimplement DEFLATE in pure PHP
 
a few are.....but tbh, telling them apart at run time with using different types sounds completely wrong. it's just so much complexity for a not usable difference.
 
I'll take your word for it
still the scales feel slightly tipped towards loss for me, if we're going to churn over all this code and not actually add very much at all ...
 
9:24 AM
However one possible advantage of defining a new OO API is to have better naming
 
@JoeWatkins I don't think people will provide their own implementation in the same sense that if we converted fopen/fclose to a OO thing, people wouldn't be implementing their own lowlevel file system code. There could be value in making an interface, and then people being able to provide completely different implementations, but not just making small additions.
Same for image stuff - you could have a useful higher level abstraction, which could be wrapped in an interface, but then the actual stuff that can be done to an image resource can't really be changed or extended.
 
Well can people make their mind up about if it's needed or not :-) Ultimately one of you has to accept or reject the PR and if it's likely to be rejected on the grounds of being too many changes for too little benefit, I'd rather focus on something that would actually lead to a meaningful contribution
 
@JoeWatkins "to churn over all this code" - I strongly support only doing the minimum amount of work to convert from a blank resource type, to a GDImage type.
 
I'd say the conversion is worth while IMHO
The OO API can be another PR
 
cmb
conversion to opaque is a step in the right direction
 
9:26 AM
@MarkR as I said the other day, separating the resource->type work, from anything else would be a really good idea.
 
cmb
we can still add methods for PHP 8 if there's time and energy
 
I haven't looked into how complex is the resource handler in the engine
 
cmb
and yes, having separate types for different image types doesn't make sense for GD
 
But if we convert everything to Objects we could actually deprecate/remove the resource "type" completely
 
oh hey, I'm just asking questions about where this is going, I didn't say I would reject it, and even if I did say that, you wouldn't have to listen because I'm a tiny minority making a lot of noise :)
 
cmb
9:28 AM
actually imagecreatefrom*() are factory functions, returning basically bitmaps
 
Please don't compare yourself to them @JoeWatkins :|
 
cmb
problem with GD OO API: do we really want to distinguish between truecolor and palette images?
IMHO the latter are no longer worthwhile
 
well no but its a lesson on judging the conversation ... I never said I wasn't in favour, but it would be a fair assumption, but everyone else is in favour, and mark is considering whether it might be a waste of time just off the back of all the noise I'm making ...
 
@cmb Except for really specific stuff such as loading an image, than loading a differently coloured palette, where the colour changes are on specific numbered palette entries - which can be used to load two 'football team images' with different coloured kits.
 
cmb
Ah, @Danack, okay. But I think there are many cases where manipulating palette images is easily done wrong.
 
9:31 AM
yep.
 
@Danack thinking of dokuwiki and hugo sits in my head all the time, I dod some small research and it would be possible to import dokuwiki files into md for hugo, with proper settings of archetykes hugo can provide templates for such things like RFC's etc. easiest way using GH only would be set up GH Pages build using GH Actions only
there are ways to provide wide range of index lists, categories and tags, it is possible to create templates rendering each archetype differenty and erroring on wrong metadata in MD files which triggers build errors
In one word it is possible - to import dokuwiki and prepare deployment which builds static content on GH Pages using no additional tools
The only thing missing which needs implementing is voting pools which needs to be written in JS the same way as for eg. installing Discus in a webpage template, storing data elsewhere
 
@brzuchal sound cool.....tbh though I really doubt there is much content we could move from dokuwiki that actually has a high value to keep. Apart from the RFC pages, due to how difficult it is to edit dokuwiki most pages are about a decade out of date it seems.
 
@Danack agree, for me personally rfc/ dir is interesting only, but if we could import everything, then could hold all content in GH repo
 
"The only thing missing which needs implementing is voting pools" - I will open the idea of exposing the karma system as a usable auth system elsewhere, but as a first step, just leaving the RFC pages on the wiki would be fine, as those don't need to be edited constantly.
 
I need to know if this is worthe exploring further, I might find time to try to setup some dokuwiki conversion and preparing some basic template for RFC like union types which already is in MD
 
9:40 AM
@brzuchal I don't want to sap your energy by nay-saying, but I really doubt spending much time on an automatic conversion is worthwhile. The main thing for me would be setting up the CSS needed to make the generated site look like a PHP site. There are just so few pages that are worthwhile to keep in the wiki it would be quicker to just convert them by hand.
btw, can see a way in dokuwiki to make a list of all the pages it has?
 
@Danack is there any relationship between karma and git access (or could it be calculated from that)?
 
2 days ago, by salathe
@ircmaxell http://svn.php.net/repository/SVNROOT/global_avail
git access comes from the karma.
but we should be using the karma system as the source of truth.
 
ok, so anyone in that file can vote?
(I couldn't find "vote" or "rfc" in there, so assume it means all)
 
@Stephen I actually have no idea. we should probably document the karma system a bit more.
 
anyway - if you already define voting access via something that already defines git access - why not simply an additional git repo for RFCs (and thus voting), and people commit a change to indicate their vote.
the 'wiki as a bunch of .md files in a repo' concept mentioned above is pretty portable (between wiki 'renderers') too.
 
9:47 AM
@Stephen I'm a strong believer in defining exactly what problem is going to be solved first, before talking about tech solutions. I want us to stop using dokuwiki for general info stuff, because editing it is very painful, and is closed to people outside who don't have php.net accounts.
 
Make an OAuth source for the karma + roles and everything else comes easy... assuming people don't want to go to war for endorsing such-and-such ORM or entity framework
 
The voting is not as subject to those problems, as the RFC pages are not edited continually, and by definition having people login to vote is fine. So I can't currently see a need to move voting somewhere else.
But there is other stuff in general where having the karma auth be available would be more useful.
 
@Danack right, sorry I thought the problem was already defined as "this wiki is a bit shit, we need a better thing to replace it"
 
mostly right, but can just do the easy bits, not the really hard parts.
 
@Stephen anyone having a @php.net account - so yeah, anyone in that file whose php.net account still exists
 
9:56 AM
@Danack the only way came to my mind is google.com/search?q=site:wiki.php.net
 
@Danack there are some infra dokuwiki pages which IIRC are quite up to date
 
Good news! Only 7 hours until Z tells us what the state of PHP is
 
@Danack that's fair enough. if your goal is to make the wiki in general (and excluding RFCs/voting) more approachable in terms of contributions, I'd think the ability to open it up via external things like GitHub PRs etc is going to help achieve that.
 
@MarkR Mark, once again, it's fine to disagree with other people on the project, but you keep taking it too far and making personal attacks on other people on the project. Please stop doing this.
 
10:01 AM
What?
 
@bwoebi thanks.
@MarkR which bit don't you understand?
 
Everything you just said. It's literally 7 hours until Zeev tells us what the state of PHP is. roguewave.com/events/live-webinars/state-php
 
Okay, I thought you were continue to mock him, like you had been before about that same webinar: chat.stackoverflow.com/transcript/11?m=47340811#47340811
it's really good to not focus on people who are annoying, but just keep discussions to technical problems.
 
We have 17 page documents designed to contain that individual, and the personal interventions of the original creator. To suggest everyone should attend his webinar, which will almost certainly be a hostile representation of the current goings-on, is hardly a personal attack.
 
Right, there's no possible way that someone organising a large number of people to turn up to an event could possibly be misinterpreted.
 
10:11 AM
If I actually wanted to brigade his event with people to argue against him, it would be the top post on r/php right now :-)
 
> :-)
At some point, you should put some effort into not taking glee at the thought of picking fights with people.
 
You're making the assumption I would enjoy picking a fight with him.
 
A quick grammar question, is this sentence valid and makes sense "till when will I receive the feedback?", my concern is the "till when" part.
 
Your concern is correct mega.
 
ok, so what would be the valid form of that sentence?
 
10:25 AM
What is it trying to say? In its current form it's a question that asks for a cutoff date that you will receive feedback, presumably on an ongoing basis up until that point.
 
mornings
 
When you pass an object through to another object, which doesn't actually use it, it just passes it through to another object instead, what principle is this violating? I can't remember the name, but I know it's a bad practice. I'd like to know if there's a name for that apart from retardation.
 
@MarkR OK, me receiving the feedback is a singular event that will happen sometime in the future, and I would like to know when exactly that will be.
 
I would phrase it something like "At what point in time should I expect to receive your feedback?" or similar.
 
I think if I change "till" to "by" it should make more sense, "by when will I receive the feedback?", what do you think?
 
10:31 AM
That's makes a lot more sense mega, it's still an end boundary rather than a specific time, but if that's what you want then yep
It's the difference between:

"You will receive our feedback by next Friday" and "You will receive our feedback next Friday".
 
hmm, thanks for your help.
 
i need a littel help implementing a simple loop ,
So i have the foreach array as item i create one tr,td,td,tr
inside the td i have "Partname", "Serialnumber"and "unit's"

So if i have "partnumber = XPTO" and "units = 2 " i have to insert 2 Serials, so i need 2 inputs(one more row) right?
 
I don't know of a particular name for it.
probably just 'dont write shite code'.
 
it is the bad way of avoiding the law of demeter violations
when a lot of code looks like
class UserService {
    public function fetchUsersByCriteria(...) {
        return $this->userRepository->fetchUsersByCriteria($....);
    }
how does code work in this chat
 
@beberlei how does it work anywhere
 
10:37 AM
@brzuchal so that there is a place to discuss work on migrating to something other than dokuwiki, please could you create a github repo for it. I started writign some words, but realised that I'm going to be bandwidth limited for ages. gist.github.com/Danack/60fe63ff0e20a2e45e3701e00fb8efc1
 
i am only talking about the rendering part ;)
 
@beberlei ctrl+k or four spaces
or single ticks for single line items.
 
thanks
ctrl+k worked
 
@Danack I'm gonna try to setup something working using one md from union types and configuring archetypes and template
 
@brzuchal cool, can you create the placeholder repo first so that I can link to it from the project coordination page please?
 
10:40 AM
@JayIsTooCommon literally begged me to show my face here, so I've come to complain about the new legacy code my coworkers are writing.
8
 
@Danack how to name that?
php-wiki ? :/
 
New legacy code... my sympathies
 
Well the CSS for the website is in the web-shared git repo IIRC
 
@brzuchal just something very specific. The name probably doesn't matter that much, it's just so that we have a link that can be shared with all the different bits of stuff to work on in a single place. remind me of your github name please, I may as well create it under php-pecl.
 
10:42 AM
(github really ought to prevent name squatters).
 
@MarkR Yep, storing state in services so they're not re-usable elsewhere
 
@Danack github.com/brzuchal/php-dev is that enough for start ?
 
Thanks
 
@brzuchal yes, I'll grab that link. though maybe copy+paste these words gist.github.com/Danack/60fe63ff0e20a2e45e3701e00fb8efc1 ?
 
@Danack Will put that in README.md
 
10:45 AM
thanks.
 
11:10 AM
Thoughts on.. my thoughts..?
> There is more value in software development from simple code extremely obvious in it's intention than from clever abstraction and indirection.
 
nope.no/nope.html
 
<html lang="nope">
@Danack Nice. I was hoping for a concrete name though so I could scream "YOU JUST VIOLATED X" (with intentional emphasis on violated)
 
@Jimbo My thoughts are your thoughts are thoughtful.
 
git clone bed@ho.me:right/now.git
 
@Jimbo I'm far too busy to really get stuck into a good conversation, but in the past I have found it useful to explicitly break 'value' in to 'benefits' and 'costs', as otherwise people just translate "value" into "stuff I like". Forcing them to talk about both benefits and negatives makes the conversation more useful.
Also, even though my performance was shite, let me find the recording of my good or bad talk....
(full disclosure, giving a talk while you have a pulled neck muscle is a bad idea.)
 
11:14 AM
Okay, so there are more benefits
 
Still benefits subjectively though ;)
 
Yes, but people are shite at maths.
 
lol
 
I got stuff to do.....the talk will give the context that people often do maths with an emotional part of their brain...
 
11:18 AM
Interesting, I'll take a look, thanks!
 
Compiling PHP in WSL now hard-resets my computer with a watchdog timeout :| Fairly sure that's my computer telling me I should be working on my day job instead
 
Okay, corrected. There are more benefits in... etc
 
@Jimbo I disagree entirely. Value isn't imparted onto code by how clean or simple or abstracted. It is imparted by the solving of a business challenge or problem. Only once the business value proposition is met fully and equally does "code quality" even begin to impact
And the level of that impact on value is negligible next to the amount of overall value it brings.
 
Tell that to the person that works on it next
 
@MarkR I would rather inherit garbage code that generates millions of dollars per year in revenue, than amazing code that generates thousands
 
11:27 AM
@Danack basically "don't create unnecessary layers of indirection"
 
All other things being equal, sure, quality matters a lot. But since when are all other things equal?
 
@ircmaxell So "unnecessary" clever abstraction and indirection, then?
I think there is huge value in how simple it is for another developer to understand the code
 
@Jimbo I do as well. But that value is maybe 0.01% as valuable as "does the thing work for the business"
 
@ircmaxell quality matters as much as it enables devs to write code which guarantees revenue in future ...
 
cmb
@MarkR, no, it's your machine telling you that you should use the native toolchain :p
 
11:30 AM
@bwoebi not if that quality code solves the wrong problem...
 
I disagree with 0.01%, but of course, I wasn't suggesting that focussing on one would affect "does the thing work"...
 
and often a quite low quality is enough for that
 
@cmb compile it in windows? That's your masochism, not mine :P
 
cmb
well, I have to :)
 
@ircmaxwell Imagine you send your entire development team on a company retreat, and in the process the bus they're on accidentally drives of a cliff and you're forced to re-hire everyone. Then tell the business the value of messy spaghetti.
 
11:31 AM
@ircmaxell Given writing a piece of code that works 100% for the business and is hard to understand for more junior people (yes subjective) vs a piece of code that works 100% for the business and is more abstracted and requires proprietary knowledge
 
Let me give an example. Let's say someone is working on an ecommerce site. And they decide they need to build a custom browser to manage the store. That web browser may be a pinacle of quality code, but in the end it is total garbage because the business didn't need it and it delivered no value other than keeping the dev team entertained
@MarkR happens all the time. And 99.9% of those businesses survive just fine
 
[citation needed]
 
@Jimbo my point is that saying "works 100% for the business" is a huge point that most of us take for granted, but really is often not the case
 
@ircmaxell My assumption was that either way it will work 100% for the business. Given that, do you more agree with my point?
 
@MarkR how many companies have you heard of going out of business because "they couldn't find developers who understood their system"
@MarkR and also you're the one making the assertion that companies would go out of business if that happened. So citation needed from you as well :)
@Jimbo yes, I do. But I just think that saying "either way it will work" is saying "ignore 98% of the problem, and this factor dominates". Which, while true and valuable, misses a lot of the point IMHO
 
11:37 AM
Let's put it this way irc, the CEO of one of the companies I am working for is currently having me train other members of staff, in the event that I am hurt or killed, because not having my knowledge is considered a business risk... and be it me being dead, or the code not being unintelligible, the end result is the same, the business takes a massive kidney punch by not being able to react to the market because new code couldn't be written.
Don't you current (or previously) work for Facebook's engineering team? I struggle to imagine they are fond of messy code.
 
@MarkR absolutely 100% correct. But that risk only exists once the software is valuable in the first place. And while there is risk to losing any person, ultimately everyone is replaceable, easier than you may think...
 
The bus factor is a measurement of the risk resulting from information and capabilities not being shared among team members, derived from the phrase "in case they get hit by a bus." It is also known as the bread truck scenario, lottery factor, truck factor, bus/truck number, or lorry factor. The concept is similar to the much older idea of key person risk, but considers the consequences of losing key technical experts, versus financial or managerial executives (who are theoretically replaceable at an insurable cost). Personnel must be both key and irreplaceable to contribute to the bus factor...
While everyone is replaceable, a good company will make it known that they don't want to have to replace you.
 
@MarkR well, let's just say this opinion has been honed seeing a lot of different examples of both sides, great code and shitty code a like ..
 
You can hire the best engineer in the world, but if it takes them a year to figure out the codebase before they can start to be properly productive because the codebase is in such a poor state, that's a) a quarter million+ salary down the drain and b) however much has been lost in the intrim because the business can't react
 
@Jimbo one variable in a sea of variables. Any good company is looking to be prepared for any of a number of risks. But code that doesn't deliver value isn't a risk, it is a direct problem.
 
11:42 AM
@MarkR do such code bases even exist?
 
Any senior engineer should be productive within a few weeks even on the crappiest of codebases. May not be at peak efficiency for 3-6 months, but productive definitely
 
@bwoebi I once worked on a codebase where huge amounts of logic were based on comparisons to completely undocumented integers =\ No constants, no defines, nada. To even find out what something was doing without asking the person who wrote it, you had to search the codebase for other instances of that number and try and reverse engineering them, and they were all equally awful.
 
@MarkR the more problematic part is hidden assumptions about some state in unrelated and obviously untested code. Tends to blow up in production. And that's when it becomes a problem for business.
 
@ircmaxell Absolutely. It seems I somehow put across with that point that not delivering value was on one of the sides of the scale - that wasn't my intention. I need to somehow keep the sentence short and concise, imply that both deliver on the business requirements, but the one where the code is simpler is "better" in as little a subjective way as possible.
 
@ircmaxell I was thinking about that fork() mini-conversation after I left yesterday - what's your thoughts on how ruby provides it (I went looking for how other scripting lang's provide fork & ipc), allowing not just for fork-right-here, but also specifying (in their case a block) what to run specifically in the fork.
 
11:48 AM
@Jimbo well, define simplicity? Local simplicity (in a function)? Global? Etc?
@Stephen I think specifying an entry point (a callback, a file to execute, etc) would be hugely valuable
 
local simplicity is nice-to-have, but usually irrelevant - global simplicity matters and is hard,
 
It would remove a ton of oddities around if($pid===0) { // I am in the child. Or is it the parent? }
 
that took me to thinking - if you combine it with a Process class (which potentially could be also used for a things like proc_open/friends too, but that's another story) to be (a) returned from fork() and (b) provided to the child, you have a nice interface to setup simple IPC
 
@ircmaxell Without arguing semantics: just simple. A piece of code that can be more easily understood than another one because it is simpler. An example could perhaps be early returns and removing those indented else's. Code is easier to understand as a result.\
Problem is - that's still subjective. But not many would argue the toss on that one
 
@bwoebi it's all a balance. Shifting and trading complexity where it matters rather than blanket one way or another...
 
11:51 AM
@ircmaxell yeah, it's nowhere black and white. But local complexity is fixable. Global complexity is very hard to fix sometimes
 
@Stephen what if you abstracted it? Provided the same abstraction for a fork as a thread as a separate process spawn... That could be interesting (using IPC in different ways to fill gaps)
@bwoebi totally (within reasonable boundaries)
 
@bwoebi yes, but that's very close to "how do you write good code? Step 1) don't write bad code".
 
@ircmaxell I can definitely see benefits to that - im frankly not at all knowledgable enough to imagine what issues that might cause trying to handle threads too - I can see how forking a child process, that either runs the same program or a specified command is absolutely abstract able - even proc_open etc is just fork, followed by an immediate exec call, right? but how much does that translate to a native thread, and how much harder does that make the implementation/compatibility with exts
 
You can either hang out in the Android Loop or the HURD loop.
2
@Stephen /cc @JoeWatkins
 
3 messages moved to Trash
 

« first day (3260 days earlier)      last day (1682 days later) »