PHP Is Just Sad
-
@lucas1 said in The "That's just sad" thread:
@Vaire Everything I referred to are .NET libraries except for DI which is used in pretty much everything these days. Almost all of the ASP.NET MVC example now use some sort of DI framework in the video.
you and I are VERY different people.
I literally saw a block of flats being built next to me at work faster than I could build a decent project due to the stupidity of "Senior" Developers and Project Management. When if I was left alone to just fucking do it It would have been done in less than a month. It is demoralising to see something making steady progress towards completion, while at the same time you see your own work hindered by stupidity.
Right, and the DI stuff was what I was referring to ;)
If it makes you feel better, if you were in my division, you WOULD be left alone to "just do it." Of course, there will be the code review, and various other controls on it, and there are standards to follow, but other than that, as long as you are bringing the stink of hipster into my code base, you are free to just get the job done :D
-
@lucas1 said in The "That's just sad" thread:
@Vaire Everything I referred to are .NET libraries except for DI which is used in pretty much everything these days. Almost all of the ASP.NET MVC example now use some sort of DI framework in the video.
This is the main reason I keep recommending that people learn MEF. It's in the framework and can be used quite nicely for DI.
-
@Arantor said in The "That's just sad" thread:
Fuck, even Python hosting is fairly rare and that's less fucktarded than PHP.
There is reason why PHP hosting is cheap. It's designed in a way that a webpage that doesn't get hits will consume zero memory.
Python and most of the others need one instance for each web application it hosts, AFAIK. It will never have hosting as cheap as PHP does.
-
@FrostCat said in The "That's just sad" thread:
Someone contacted me last week about a possibly-PHP gig and heaven help me, I'm so bored where I am now, I considered it.
Just ask them what IDE you'll be using.
If they say "vi, directly on the production server", you can tell them to fuck off right to their face. It's about the only exception I have to the list of "be nice and professional in an interview" rules. Seriously. Double-bird flip and even take a dump right on their lap.
-
@Lorne-Kates said in The "That's just sad" thread:
If they say "vi
, directly on the production server", you can tell them to fuck off right to their face
-
@loopback0 The only saving grace of vi is that it's what tends to be present when the shit hits the fan,
/usr
refuses to mount, and the network interfaces on the machine simply won't come up. BTDT :(
-
@dkf Yes, but that's no excuse to use it as an IDE.
-
@Lorne-Kates How about VS over RDP? On the prod server?
-
@loopback0 said in The "That's just sad" thread:
Yes, but that's no excuse to use it as an IDE.
Everyone knows
vim
should be used instead.
-
@Magus Unfortunately it is one of those things that seems to take over the whole bloody application.
-
@lucas1 MEF or DI itself?
DI kind of has to. That's why it exists.
MEF is just attributes. Where you need them, you use them. If you aren't writing code that could be put together without it, your code is simply bad. That's the main advantage MEF has over other approaches: it's unobtrusive, and you can simply not use it and do things differently if needed. It just saves time and effort.
-
@Magus With the OWIN + .NET 4.6 they had an unobtrusive DI that was essentially middlewares, I think they have this in .NET core ... but until they have 1.0 final I ain't touching it with a barge pole.
Obviously I am approaching this from "full stack web developer" mentality.
I am believer in KISS, a lot of the stuff I tend to write just has Auth + Send some data / html to client. It is stuff that doesn't really need DI, lot of rigorous automated tests etc.
-
@lucas1 said in The "That's just sad" thread:
With the OWIN + .NET 4.6 they had an unobtrusive DI that was essentially middlewares, I think they have this in .NET core ... but until they have 1.0 final I ain't touching it with a barge pole.
[Export] public class ThingThatUsesStuff { private readonly IStuff stuff; [ImportingConstructor] public ThingThatUsesStuff(IStuff stuff) { this.stuff = stuff; } }
- The class can now be used with MEF, and will import a
Stuff
instance if that's exported. - You can use it without just as easily.
Yes, you have the attributes on all the classes you need to use DI on. But all of your actual code functions in the most natural way possible. You could do something with a configuration file, but this isn't even specifying what it needs. Simplicity and variability, with no extra code to facilitate the DI.
- The class can now be used with MEF, and will import a
-
@Magus If it is indeed that simple I will be having a look.
-
@lucas1 The only 'complexity' is that you have to configure the catalog and tell it to build the object graph somewhere, but the catalogs can be based on assemblies or even directories, because it's designed to do plugins as well.
-
@Magus Err lost me there. No thanks then.
-
@lucas1 Basically, you need to say somewhere, "Give me a thing from MEF". That requires that you tell it which directory/assembly to scan and do all the DI and create all the objects.
So like 5 lines somewhere when your application starts off, usually.
-
@lucas1 It's simpler than it sounds:
var directoryCatalog = new DirectoryCatalog(System.AppDomain.CurrentDomain.BaseDirectory); var asmCatalog = new AssemblyCatalog(typeof(App).Assembly); var catalog = new AggregateCatalog(); catalog.Catalogs.Add(directoryCatalog); catalog.Catalogs.Add(asmCatalog); var container = new CompositionContainer(catalog); container.ComposeParts();
Fake Edit:
@Magus said in The "That's just sad" thread:
So like 5 lines somewhere when your application starts off
This.
-
@Magus I am mega dubious, as I said I will have a proper look.
The biggest problem is whether it works on things that aren't Windows, as I am have become macfag.
-
@NedFodder That's nearly as simple as the core of Spring is these days. (Lots of complexity under the hood, I bet, but if it is working who cares about that.)
-
If someone in @mods could move the side discussion about PHP, MEF, and whatnot (say, everything below @Arantor's "sadly not" post) elsewhere I'd appreciate it. While interesting, it doesn't really belong here. (INB4 "of course PHP stuff belongs here").
-
@FrostCat of course PHP stuff belongs here!!
-
@lucas1 said in The "That's just sad" thread:
One of the other places I was working at they decided it would be a good idea to base everything on StructureMap which in affect made all our code incompatible with .NET 4.5 even though it ran on 4.0 fine.
I beleive we've met and he's currently unemployed if you need him.
-
@FrostCat said in PHP Is Just Sad:
If someone in @mods could move the side discussion about PHP, MEF, and whatnot (say, everything below @Arantor's "sadly not" post) elsewhere I'd appreciate it. While interesting, it doesn't really belong here. (INB4 "of course PHP stuff belongs here").
Like this?
-
@abarker booooo hiissssssssssssssssssssssssss booooooooooooooooooooooooooooo
-
@Arantor said in PHP Is Just Sad:
@abarker booooo hiissssssssssssssssssssssssss booooooooooooooooooooooooooooo
Thank you! I'll be here all week! Enjoy the !
-
@DogsB Unfortunately I inherited the
shitcode
-
-
@FrostCat Who died and made you blakey?
-
@loopback0 said in PHP Is Just Sad:
Who died and made you blakey?
I started the thread, so I guess me. I thought the conversation was derailing it, just like a similar convo would derail the status or x ideas threads--which that was intended to be one of.
-
@FrostCat it's all good :)
-
@abarker said in PHP Is Just Sad:
@FrostCat said in PHP Is Just Sad:
If someone in @mods could move the side discussion about PHP, MEF, and whatnot (say, everything below @Arantor's "sadly not" post) elsewhere I'd appreciate it. While interesting, it doesn't really belong here. (INB4 "of course PHP stuff belongs here").
Like this?
My post doesn't make a iota of sense now, thanks!
(inb4: "That implies that you made sense at some point in the past!")
-
@Rhywden Well maybe if you used a flag instead of an inline post, you wouldn't have this problem.
-
@abarker said in PHP Is Just Sad:
@FrostCat said in PHP Is Just Sad:
If someone in @mods could move the side discussion about PHP, MEF, and whatnot (say, everything below @Arantor's "sadly not" post) elsewhere I'd appreciate it. While interesting, it doesn't really belong here. (INB4 "of course PHP stuff belongs here").
Like this?
:( I was hoping to hiijack this for my own purposes :(
-
@abarker said in PHP Is Just Sad:
@Rhywden Well maybe if you used a flag instead of an inline post, you wouldn't have this problem.
A what now?
-
@Rhywden said in PHP Is Just Sad:
A what now?
A f-l-a-g.
And I just realized it was @FrostCat that made the initial request. Getting the white animal avatars confused.
-
@abarker That's why we have something called names, y'know? :p
-
@Rhywden What are names, precious?
-
@abarker what we use to identify you when you keep changing your avatar
-
@abarker said in PHP Is Just Sad:
@FrostCat said in PHP Is Just Sad:
If someone in @mods could move the side discussion about PHP, MEF, and whatnot (say, everything below @Arantor's "sadly not" post) elsewhere I'd appreciate it. While interesting, it doesn't really belong here. (INB4 "of course PHP stuff belongs here").
Like this?
Close. You left it Meta. Now moved to the Sidebar.