This is the (almost undocumented) best practice for using the dependency injection container in Symfony, so Sensiolabs Insights won’t return an error that states “The Symfony Dependency Injection Container should not be passed as an argument“.
Any class that needs to use the container service should implement the
ContainerAwareInterface interface and in addition use the
ContainerAwareTrait trait. Here’s an example with a Doctrine migration:
Object Calisthenics are programming exercises, formalized as a set of 9 rules invented by Jeff Bay in his book The ThoughWorks Anthology. The word Object is related to Object Oriented Programming. The word Calisthenics is derived from greek, and means exercises under the context of gymnastics. By trying to follow these rules as much as possible, you will naturally change how you write code. It doesn’t mean you have to follow all these rules, all the time. Find your balance with these rules, use some of them only if you feel comfortable with them.
Source: Object Calisthenics · William Durand
- Only One Level Of Indentation Per Method
- Don’t Use The ELSE Keyword
- Wrap All Primitives And Strings
- First Class Collections
- One Dot Per Line
- Don’t Abbreviate
- Keep All Entities Small
- No Classes With More Than Two Instance Variables
- No Getters/Setters/Properties
All of a sudden, Mandrill has decided to merge back with MailChimp (originally, Mandrill was a startup within MailChimp, but operating independently, with their own model, databases, prices, etc.), and while doing so, they’ve basically forced their users to start spending up to 4x as much for the service.
Source: 5 Mandrill Alternatives for Your Transactional Email
Context: Mandrill Blog
According to Uncle Bob: Structured Programming (Amazon affiliate link. thx)
Also, Structure and Interpretation of Computer Programs. This one is free – html or pdf.
You should, as a programmer, make it your goal to go home everyday home proud because of what you did that day, because you did it in a way that was ethical, and by the principles, and held to standards.
Uncle Bob in action (1h video).
It can ask questions and centralize answers, schedule questions, be trained for custom interactions, and even make you smile! 🙂
Here’s a sample of what Howdy can do:
You thought that’s awesome? Checkout this.
All you need to do in your Slack #channel is:
This weekend I participated in the hack.summit() virtual hackathon 2016 along 5 other guys – one from UK, one from Switzerland, two from India, and another one who was silent on Slack for the whole time.
We were 6 guys skilled for back-end. Guess what? We failed. The thing we missed the most was someone to articulate our technical ideas. Continue reading
A few weeks ago I heard about Code Fights during an interview at a cool web development firm. Those guys rocked it hard, told me the HR girl. I tried a few practice rounds against bots just to see how I compare to them. Math, bugfixes, code recovery and free code, all timed. It was fun.
This is not my first blog, but it still feels like an adventure. I’m gonna write about technologies that inspire me. Happy reading!