« first day (1313 days earlier)      last day (3860 days later) » 

09:00
@shortCircuit ...because people are allowed to have opinions and you shouldn't really put a lot of stock in any single one of them? I think OSX is stupid and bad, I doubt Apple give a toss what I think...
RequestHandler should be named 'CodeBaseRequestHandler.php' btw.
@Fabien You're using Auryn, aren't you auto-DI'ing and having controller methods mapped to request?
@Fabien What exactly is preventing you from doing $data = $handler->getData(); $response = $renderer->renderData($data); in that function?
@DaveRandom Fair point.
@Jimbo mapped how is my issue.
Also it looks like you are abusing the DI container into a service locator...
09:02
Well... That was good to hear.
@Fabien Use your injector to create your controller class (in it's own file), and also to run the method on it. Once you have that set up, you then only need to touch the code in controller classes (apart from alias's, define's etc - which you can put in a config file and foreach() around them in your bootstrap)
I have: $this->injector->execute([$this->injector->make($controller), $action], $args);
What does the controller class look like?
class HomeController
{
    public function indexAction(Twig_Environment $twig, APIService $api)
    {
        // You can DI anything into indexAction here ;)
        return $twig->render('whatever', array(
            $api->getData()
        ));
    }
}
Just preface the $controller variable with the correct namespace before running make() on it
So do RequestHander in there too?
Request handler stays in your bootstrap
Your bootstrap should sort the request into controller and method, do all your alias's, defines etc with auryn, then run controller / method. That's it
09:10
handler has no point of being in the controller
but you could pass an abstraction of handled request to the controller or its method
Due to the nature of the routing/dispatching I'd need to inject the Handler in to the route dispatcher.
I also share() Silex's Request object so I can typehint for it in my controller if I need something from the request
Time to get the pen and paper out
I am very angeeryyy now ... Opinion without explanation is like php without $
Just so we're on the same page by RequestHandler and this is my fault, I am referring specifically tot hat which sets up/chooses the right class to make requests for the API. There's probably a less confusing/wrong name for it. If so, what are you guys thinking of RequestHandler as?
09:20
@Fabien ClientLocator?
although "client" is not accurate, maybe EndpointHandlerLocator?
Don't like that either
Locator makes more sense though
It's definitely a "locator" and not a "handler"
So is a RequestHandler a thing?
tbh I try and avoid the word "handler", it doesn't mean a whole lot
Usually when I use that it means I couldn't be bothered coming up with a proper name
heh
09:22
Same goes for "manager", to a lesser extent
So CodebaseApiLocator goes in to my bootstrap?
Almost every page needs it. So I guess so.
@Fabien CodebaseAPIConsumerLocator probably, although that's clunky, you aren't looking for the API, you are looking for a thing which will consume the API
Aye
Naming classes and methods is hard. I can't imagine what it's like naming kids.
@Fabien @DaveRandom's is also just called kid
lol
09:27
could someone look at this question
We chose Charlie's name in the car on the way to the register office on the very last day we could do it without getting fined
@DaveRandom heheheheheheh
My mother changed my name from Phillip to Fabien at the last second.
Thankfully.
Why not APIAdapter?
can anyone help me with an sql query stackoverflow.com/questions/23779161/…
09:32
What's the role of an Adapter?
More conversion than location.
> It is often used to make existing classes work with others without modifying their source code.
The other 'class' I guess would be the result of the API call
@Jimbo no, not often. But more often then having to write a regexp.
@GotalovePHP are you aware that your blue lines are not actually obscuring the information, that you are trying to hide
lol.
@Fabien Wut?
@SecondRikudo Manga tenticles.
09:46
Guys, im stuck.
Have you tried lubricant?
I am learning about API's, SOLID, dependency injection, autoloading, OO, but I feel like I am missing the wires to couples everything together... I am starting to understand what the terms I described mean.. Suggestions how it could make more sense to me? I really want to understand this all. Lubricant is not solving the problem.

Isn't there some kinds of 'schema' which shows/describes the workflow of a good project?
A micro-framework you should take a look at (I said that yoda style but cba re-writing it) - just to understand what it does and why
Autoloading is automatic with PSR-0, using composer or something like that is key as it's all automatic
OO - every object you make the public methods are an API to the object's usage. So code every single one individually as if it could work entirely on it's own, with API documentation for the public methods
@Duikboot the "lubrication" in this case would be "practice"
if you have learned the theory (or at least, have some understanding of basics), you should try to apply it to some project of your own
@Jimbo What micro-framework could you advice to take a look at?
@tereško Yes, I have red a lot about the theory of the techniques, implementations of the terms I mentioned above.
09:59
@Duikboot rdlowrey has Arya - only reason I haven't taken a look at that is because it doesn't have authentication included and I'm finding it a nightmare to try and integrate it (just because authorization is a big deal, from symfony anyway). There's Silex which is awesome
I'm about to push integration between Silex + Auryn DiC onto Github
I'd mention PitchBlade but @DaveRandom gets jealous :p
@Jimbo : So you would suggest me to digg into silex and see how everything has been setup there?
/me has stopped believing in 'The Gospel of Microframework'
@Duikboot I'd honestly suggest try writing your own to save you time in the future, figure out what parts do what and why (routing etc), realise why and how frameworks can save you time, then choose one that best fits your needs
You will fail miserably at writing your own with good code. It doesn't matter, you'll learn and realise why frameworks can be useful in certain circumstances
10:06
@tereško You're subscribing to the component gathering notion now?
yeah
True, but what if I feel currently not -smart- engouh to start writing my own one? I think right now : when I start writing my own I would just make a copy of the existing Silex one...
heh
I started with making clone of Kohana (v3.1, IIRC)
that's when I begun learning about OOP & shit
I agree with component gathering but on the same level as @Duikboot I still have a lot to learn from the micro-frameworks.
@Duikboot A framework starts off with the very basics: a router (to route stuff from url -> controller / method)
You'll have a Request and Response object ready to use, the Request will be pre-populated ready for use in your controller with all the superglobals (GET, POST etc) sanitized and safe to use within the request object
10:09
I created my own router & "micro-framework" when I thought that singleton is a pattern..
God, forgive me for that
well .. it is a pattern .. only a really bad one
@tereško Would you still suggest for making a clone of Kohana for learning? Or would you say start with an other one like Silex,...

@Jimbo Indeed I worked with Laravel and I liked the routing they are using a lot. But for example.. I have no idea how it works behind 'the scenes'.
and when I get around to pull data from my old laptop's HDD, I will be able to share my first framework with you guys .. it is a crime against humanity
@Duikboot Give Symfony a go. Follow a load of tutorials - knplabs has some. Once you have your head around where to put stuff when you want to code, you can move to silex to decide your own architecture and use more best practices
@Duikboot don't clone a framework. Make a minor project without a framework.
10:11
Don't try and learn everything at once btw, it won't work
Make a simple blog.
Making a framework is like a rite of passage for php devs.
^ That's agood idea, then once you've done that, switch to a framework and see how it can help you do it faster and easier to modify in the future
Allright so let's say Ill start downloading silex. ( I take it next to me as a copy and try to pick the logic I need? ) So I can try and understand how everything works.
little php storm tip: you can refactor on one screen while you have the diffing on the other.
10:17
Oh and before I dive into it ... Should I get rid of mamp? And start using my built in PHP / Apache config?
I wouldn't go for silex before symfony
It's build on symfony components, but it's useful to know how they work before you try and do more of the hardcore stuff yourself
user924016
Hmm maybe pick up some packages and assemble them into a frameworks of sorts
It's too easy for us who have gone through it to recommend do this or do that... you kinda need to do what we did. Go through all the crap first and come to the realisation yourself
So write your own, try symfony / other popular framework
@RonniSkansing too complicated
10:22
just use libraries. keep things simple at the beginning, do your own steps, start with functional decomposition. The framework is what you make it.
fail early :)
@Duikboot nginx. Not Apache :)
You're on OSX?
I am on OSX using MAMP currently.
You'll find plenty of brew tutorials to get you setup then.
nginx, php, php-fpm, postgresql etc.
user924016
@tereško yea you are right.
Why ngnix?
10:25
Easier. Better.
user924016
Why not php buildin for dev?
@Duikboot optimal solution would be a custom-built VPS setup, next step downwards would be a virtual machine with a custom build setup. The lesser option would be a custom built solution within your existing OS
@Duikboot because he hates you and wants to fail.
@tereško with OSX it's fairly straight forward to get it built in.
for a newbie, configuration of apache will be a lot easier .. it might even work "out-of-box"
It's the VirtualHosts on apache I don't like.
10:26
true, but he won't need it
What do you mean with custom-built VPS setup? ( I have currently 2 VPS's running both managed )
Manage them yourself :)
^ that
Setup: CentOS 6 & cPanel/WHM New York, NY
@Duikboot I bought hosting with tilaa to help me learn more about server admin. It was somewhere I could just hit a 'reset' button.
Kill off cPanel.
10:28
The other one is using DA.
WHM kill that too.
Do EVERYTHING in the command line.
Sure it's not easier but it's best to learn and become comfortable with it. If it suits your goals.
Even if it doesn't, good to learn.
user924016
Hehe there is so much great stuff to learn =]
Not enough hours in a day!
Not enough years in a lifetime.
as a web developer you need to understand what server can and should do, otherwise you have no idea if something has been done wrong on your production box (which would usually be managed by some 3rd part)
user924016
10:31
I would really recommend you to divide and conquere @Duikboot, pick the smallest part of a problem you can play with and keep focus on it until you decide to work on another unit.
It's crazy when I think about how much I have learnt, but not as crazy as how much I still have to learn :P
yeah , I know the feeling .. also, I have a feeling that my "must learn later" list is longer then yours
Documentation wise, and phpdoc for IDE autocompletion, for every single interface you typehint for, do you also add /** @var ConcreteClassInstead $var */?
Basically so someone who looks at your code actually knows what concrete object currently exists there? If you change that concrete object, sure.... you need to change one line of documentation but.. how else do you do it?
it's @param and "no"
ok people ... I got a question
Yep that's what I meant. Well, how else are we to get ide autocompletion and ease of reading for other devs apart from step-by-step debugging to see the concrete type?
10:41
is it just me or someone stole @tereško account?
never seen them asking that many questions
how bad would it be to use a thoroughly trusted class directly as a dependency instead of mocking it?
I really don't want to mick it
^ ^ ^ it's an answer there
what does that another class do?
is it pure or relies on something else?
the "interface" in this case contains only three methods (aside from getter/setters)
that is not the proble
problem is that one of those methods returns an array, which can contain object of the same class as the one on which the method was called
in effect: a tree
and mocking it will be just painful
user924016
10:44
deja vu
@tereško Your learn list increased due to work?
@Fabien not really. That increase has been insignificant to be considered within bounds of statistical error
@tereško oh! that actually is a nice thing to discuss: don't you prefer DTOs over arrays?
@tereško the Web GL stuff then?
DTO's? As in Data Transfer Objects ?
10:47
yep
to use MyTreeDTO instead of an array-based tree
In this case the tree is mix of both
but I do not have a preference for either
anyway, personally I mock everything in my unit tests
unconditionally, without any "it will be painful" exceptions
So in the DTO, you have multiple classes that are 'combined' together by an Assembler that result in a single DTO object
?
@zerkms I do too, but I just hate writing mocks which produce other mocks
heheheheh
Can't see anything wrong in the code you posted... — Mike W 1 hour ago
10:51
@Jimbo yep
user924016
lol
And as something that is the opposite to DTOs is martinfowler.com/bliki/DataClump.html
@Jimbo that way you don't rely on arrays which structure is based on conventions, but on interfaces
@Jimbo say "your brain"
Hello all
@Jimbo on Auryn if I am injecting a class which has a constructor param. How do I pass it?

$injector->define('MyClass', ['arg2' => 'SomeImplementationClass']);

Treats the value passed as a class. Mines just a string.
I need help regarding php Mailer
10:54
@Fabien Prefix scalar values with a colon: github.com/rdlowrey/Auryn#non-class-parameters
@PeeHaa Hehe, nicely done @MikeM.
so :arg2 ? I thought that was for defining passing pre existing classes.
@Jimbo you see - conventions!!!
oh nm i see
if it was new ScalarValue(), new Reference() - then they wouldn't ask about it
10:57
anyone here to help me?
@Jimbo Not sure this work. This passes the value as a raw value. So I am just passing a string.
user924016
Maybe if you ask a question, someone might help.
@Fabien You don't want to pass in scalar values? I misunderstood your question
Show me an example of your constructor signatures and I might be able to help
public function __construct(\Twig_Loader_Filesystem $loader, \Twig_Environment $twig)
@Jimbo, @Fabien, I need help regarding php Mailer
10:59
Twig_Loader_Filesystem() takes a constructor param of a string
Hmm
I'm guessing two steps?
Fellas, how about a canonical about
First, define() the params for Twig_Loader_Filesystem() with the args. Then resolve the MyClass object
> Warning: function_name() expecting parameter N to by type_x. type_y given
I am getting error : Mailer Error: The following From address failed: [email protected] : Called MAIL FROM without being connected
11:02
@Jimbo So inject an existing instance? Or I don't need to make() on it, just define.
Issue is that it is working fine on localhost but it is giving this error on Hosting Server
@Fabien I'd try define first
what i should turn off and on again @jimbo — Vikas Rana 11 mins ago
The computer, no, the mousemat. — Jimbo 1 min ago
Turn off your mousemats
@Jimbo (-‸ლ)
heh it's a little more complex it seems :)
How come?
11:06
$loader = new \Twig_Loader_Filesystem(__DIR__ . '/public/');
$twig = new \Twig_Environment($loader);
That's how you'd do it without Auryn
Yep
My aim is to put those two in myClass's constructor.
How would you do it with Auryn?
Let me set up a test and I'll give it a go
Cool cheers. I wonder if the big issue is one of them requires the other in construction.
user924016
11:20
It is not =]
@Fabien I see the problem - it's not doing as expected, not sure why
@Jimbo Perhaps something to flag @rdlowrey for then.
user924016
I used Twig and provisioned with Auryn before, want me to see if I can dig up an example?
Back from lunch.
Twig_Environment works fine
user924016
11:26
Which Twig version, latest stable?
@tereško Based on:
yeah , I know the feeling .. also, I have a feeling that my "must learn later" list is longer then yours

Do you somewhere hold a list about thing you should learn lateron?
It's \Twig_Loader_Filesystem - the constructor of which merely sets a class member
@Duikboot yeah: opened tabs and pdf's on desktop
=/
opened tabs? You hold your tabs always open? :)
also "watch later" in youtube
11:28
doesn't seem to set the class member
$x = $provider->make('\Twig_Loader_Filesystem', [__DIR__ . '']);
var_dump($x); die;
yes , I tend to have 50+ tabs opened in browser
object(Twig_Loader_Filesystem)[175]
    protected 'paths' =>
        array (size=0)
        empty
    protected 'cache' =>
        array (size=0)
        empty
Would be painfull if it crashes and you can't get them back.
@Duikboot it was rare on opera. I lost my tabs only twice in ~5 years.
I have yet to experience an unrecoverable crash in Aurora (it tends to crash from time to time, but the tabs a re still there wehn I restart)
@Fabien actually..
$provider->make('\Twig_Loader_Filesystem', [':paths' => __DIR__ . '']);
That works
What about something on the lines of...
$provider->define('\Twig_Loader_Filesystem', [':paths' => __DIR__ . '']);
$twigFs = $provider->make('\Twig_Loader_Filesystem');
$provider->share($twigFs);
11:32
So you re-open your tabs when you restart your browser?
@Jimbo and the constructor for Twig_Environment being that Twig_Loader_Filesystem instance?
@Fabien of course
user924016
@Jimbo if you do $provider->share('\Twig_Loader_Filesystem'), before defining, does that work also?
As Twig_Loader_Filesystem and Twig_Environment are constructor params in myClass. myClass is instantiated through Auryn. Does it still work?
Why wouldn't it?
user924016
11:39
How come you want both inside the class for dependencies? Should it not be a fully constructed twig?
@Fabien You'll have to test it in your code
$provider->share($provider->make('\Twig_Loader_Filesystem', [':paths' => __DIR__ . '/Controllers']));
Is where I'm at atm
BUT that means that whenever auryn encounters a typehint for \Twig_Loader_Filesystem, it'll use the one you've already shared
(That's what you want, right)
@Fabien You testing this?
Yeah. This is the basics of what I am after Example
So I need to define outside of myClass
@Jimbo NNNnnnngg. That's not optimal
$provider->define('\Twig_Loader_Filesystem', [':paths' => __DIR__ . '/Controllers']);
$provider->share('\Twig_Loader_Filesystem');
@Danack Ahhh, okay
Avoids creating the object as it may not be needed by the request.
11:44
In which case could I not just use the existing method method?
 $provider->share($provider->define('\Twig_Loader_Filesystem', [':paths' => __DIR__ . '/Controllers']));
is it necessary for html files with php code to have a .php extension?\
@Jimbo define doesn't return anything....
Or can php code be run in .html files too?
@Ufoguy yes, unless you change some config on the server
11:45
Ok
Good evening btw :D
Good evenening
@Ufoguy You can use a simple htaccess to change that behaviour. Google is your friend. Actually SO is your friend :P
Is the php code shown to the users when they view the source of the page?
@Ufoguy Ok, it's time to start reading a book.
11:47
@HamZa
I actually am
Head first php and mysql
But i'm just in the beginning
Can you please answer the question
crap
I know php is server sided and generates HTML dynamically but I'm not sure if the php code is removed
@Danack Oh yeah
Me = being daft
coffee time maybe.
Doesn't seem to love it. Not picking up the loader.
11:49
lunch time //if only I have lunch
Here's my config file for Auryn:
# Auryn Dependency Injection Container Settings
auryn:
  # Objects to delay 'share' of until within the controller resolver (needed for Application and Request)
  delay: ["request", "application"]
  # Objects to define around the application
  define:
  # Objects to 'share' around the application
  share:
    # Share objects that are already registered to Silex within the Application object
    - "twig"
    - "db"
  # Interfaces to 'alias' to concrete objects
  alias:
    "App\TestInjection\TestInterface": "App\TestInjection\TestClass"
I just put my stuff in there for awesomeness
Bootstrap foreach()'s around these and does it's stuff, so in the future I just edit this config file
HIi all
i need one help on database
i am creating a earning coin system for every facebook invite of friend but coin will be credited once use join . how can i do this please guide me
user924016
@Fabien I got a small working example if you need it? I can upload it to github
@RonniSkansing Yes please
user924016
moment
@Jimbo why you no just use what Silex has?
anyone?
@iroegbu Because Silex doesn't have an autowiring DiC
It uses Pimple, which is a glorified associative array that requires you to set up every single object you want to Dependency Inject
@RonniSkansing The constructor for Twig_Environment is the Twig_Loader_Filesystem class.
With Auryn, you don't need to specify that a class needs an object, you typehint for it and it's automatically handed to you, with no extra configuration
12:00
And Twig_Loader_Filesystem has a constructor of a string.
@Fabien Did the define stuff not solve it?
@Jimbo It couldn't find the loader still. I'm sure it's probably me being dumb though.
back in 30 lunch + brain rest
@Fabien "It couldn't find the loader still" What does that mean?
user924016
@Fabien Im not sure what you mean. The Twig_environment gets injected by Auryn with the shared Twig_Loader_Filesystem. So yea, I do not see the need for having a Twig_Loader_filesystem as a dependency in the MyClass
user924016
The Twig_environment gets a string when defined, ":paths":$paths (might have been define instead of make in the provision, so we do not create it before needed)
12:06
@Jimbo now, I'm super interested... this Auryn
Yep, that's it
In your bootstrap, tell it to create your controller, and run the method, and from that moment on, you can DI anything, anywhere, (concrete objects) with zero extra configuration
Thing I haven't figured out yet is, say you have a signature: public function __construct(AnObject $obj, $scalarValue); and the $scalarValue is user defined - so you'll only have access to the $scalarValue within the controller (from the request) - what do you do?
I'm guessing use a factory, but really that's just a proxy to creating the object (basically, delayed) - anyone?
user924016
its because the loader is default null
@rdlowrey Any opinions on the above?
user924016
Let me fix it
12:15
@RonniSkansing Here's a simpler version of the code.
user924016
I pushed the new version with the loader loaded
@Jimbo $injector->defineParam('scalarValue', 5);
@Danack And the number 5 is given, from a user, via an AJAX request
So it's not known at compiletime
Yet I believe that the object to be instantiated requires this, so it is a constructor argument (not setter)
@Jimbo you probably mean compiletime.....but yeah $injector->defineParam('scalaraValue', $_GET['someVar']);
before you need the object?
user924016
@Fabien the reason it did not load the file system was because it has a default value in the construct. "public function __construct(Twig_LoaderInterface $loader = null"
12:19
Or you've fucked up your classes and instead should have:
@Jimbo You can specify parameters in call-time.
@Danack Okay so the object will be typehinted for in my Controller, and the POST in the same controller method provides the number 5
public function __construct(AnObject $obj, Request $request) {
    $value = $request->getValue('someVar');
}
@Jimbo I don't understand your last sentence - suggest writing a code example.
Works good @RonniSkansing thank you
user924016
@Fabien np.. any time I can help
12:21
public function TestController {
    public function indexAction() {
        // without DI
        $service = new MyService(AnObject $obj, $value); // $value is decided right here in this controller method
    }
}
If I move MyService into indexAction method signature, it requires $value that is only decided within indexAction
Do as Danack says, pass Request to fn and get what you need from obj
public function indexAction(MyServiceFactory $factory) {
    // Do something to decide the $value ...
    $service = $factory->build($value); // AnObject is figured out in factory for me
}
^ A way around this is to DI a factory:
Request was an arbitrary example - mine was that within that method, that is where I decide $value.
And it's not optional (so no setter)
Honestly, is that a code smell, or is it a legitimate example? I believe it's legit...
you pass a factory, if you have no automated DI container
@tereško Can have automated DI container in factory
@tereško the question is how do you map variables from the user request into the DIC.
12:25
Yep, but not just from a Request object - I'm talking scalar values
Forget the request bit
@Jimbo and yeah, your controller is deciding how to parse the user params:
public function TestController {

	function __construct(Request $request, ServiceFactory $serviceFactory) {
		//copy the params to internal
	}

    public function indexAction() {
        $value = $request->getValue('foo');
        $service = $serviceFactory->create($value); // $value is decided right here in this controller method
    }
}
Hmmm
I guess. Sometimes I want to write a service that knows nothing of any sort of request object
Yet the value that I need for this service happens to be coming from my request object. Make sense?
I'm trying to code for framework agnosticism - therefore the Request object goes no further than my controllers
You can also have in your bootstrap layer some code that parses user request variables, and sets them up through $injector->defineParam() as effectively global vars for that request.
Hmm
@Jimbo as the code I wrote does? The controller knows about the request not the service.
12:28
@Danack Yep, effectively I'd have to use a factory wouldn't I
What about something in Auryn that doesn't actually resolve the object typehinted for, if it has scalar values that aren't defined, until some special method is used on it to set the value in the constructor?
At some point you need some code that i) knows about how the variables are passed into the request ii) knows how to create the service you want. So yes, at some point you need to have the ability to create the service object, after you've done some work to parse the vars.
Effectively holding it's instantiation until it's used
Like a setter, but setting a constructor value, albeit delayed. Is that retarded?
Would avoid a factory..
user924016
@Fabien alright with you I delete the repo now?
Yup. Thanks again :)
@Jimbo That could be supported but currently isn't (I think) - that's analogous to the $injector->delegate('someClass', $callable); which is used to create classes through effectively a factory method.
You're talking about a $injector->delegatorScalar() function being added.
12:32
I believe so - that would be really useful
I've seen this quite a few times when writing libs that don't depend on any object for a user supplied value
@Jimbo Predicted response from rdlowrey:
LOL
@Jimbo I'm going to go and think about that. It does sound useful - and fucky.
I'm definitely of the opinion that having multiple 'layers' inside an application is a Good Thing(tm), i.e. one layer that knows about the request object, and handles it, and then passes off to a service layer which knows nothing of the outside world.
Most of the current frameworks have just a single layer, which does indeed make trying to do things like parse user variables into constructor params for the objects that need them feel icky - but I think that's a bad thing.
12:39
				if ((lookup = somefcall()) == NULL) {
					*pce = NULL;
				} else {
					*pce = lookup;
				}
^ I'm trying to make sense of that if statement :o
*pce = NULL;
lookup = somefcall();
if (lookup != NULL) {
	*pce = lookup;
}
Or why "One line, one statement" is so important.
How could you implement stream_truncate for a stream wrapper?
@Danack why not just *pce = lookup = somefcall(); ? Or am I missing something?
@bwoebi Because that's farking retarded?
huh?
12:45
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it."
It's harder to read the line where there are multiple things going on - writing it as simple as possible makes debugging it far easier.
Actually that snippet above is confusing me instead of helping ^^
@bwoebi totally, which is why I would rewrite it as a single statement per line as above.
well, your code still should be written as
lookup = somefcall();
*pce = lookup;
user924016
lol
Or just *pce = somefcall();
12:50
in case where we need both variables later, but well^^
*pce = ((lookup = somefcall()) == NULL) ?  NULL : lookup;
Ternary all the things

« first day (1313 days earlier)      last day (3860 days later) »