Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "yii"
-
Today my manager told me she would get us phpstorm amongst other things If I requested them.
Sometimes I really want to hug this woman.
Awww yii phpstorm rules20 -
Hello there, just couple of words about PHP. I've been develop on PHP more than 10 years, I've seen it all 3,4,5,{6},7. Yes PHP was not good in terms of engineering and patterns, but it was simple, it was the most simple language for web to start those days. It was simple as you put code into file, upload it via FTP and it works. No java servlets, no unix consoles, no nothing, just shared hosting account was enough to host site, or even application with database. As database everybody used to have mysql, again because its simple to start and easy to maintain. So PHP+MySQL became industry standard on Web during 00-2012, and continues in some way.
You can write HTML and logic inside single file, within php code, even more single file may content few pages, or even kind of framework. That simplicity and agility sticks everybody who wants to develop sites with PHP.
This is pretty much about why it is so popular.
Each good or wannabe PHP developer in an early days write its own framework or library (like in javascript this days because of nodejs)
Imagine that PHP has hadn't have package manager, developers used to have host packages on their own sites, then various packages catalog sites created, and then finally composer. A gazillions of php code had spread over internet, without any kind of dependency control. To include libraries to your projects you have to just write include, or require. Some developers do it better than others.
So what we have ? A lots of code, no repositories, zip archives with libraries, no dependency control.
Project that uses that kind of code are still alive even today, they are solid hose of cards, and unmaintainable of course.
And main question that I'm trying to answer is Why PHP is not good ?
- First is amount of legacy code which people copy and pasted into their project, spread it even more like a virus.
- Lack of industry standards at the beginning lead to a lots of bad practices among developers. PHP code usually smells.
open source php projects in early days was developed in same conditions so even in phpbb, phpnuke, wordpress, drupal used to have a lot of bad practices in their codebase. So php developers usually not study by another library, instead they write their own frameworks/libraries.
- "It works", - there are no strong business demands, on web development, again because lack of standards, and concerns.
This three things are basically same, they linked to each other and summarize of answer of why PHP have strong smells and everybody yelling against it.
Whats is with PHP nowadays ? Of course PHP today is more influenced by good practice of webdev. Composer, Zend, Laravel, Yii, Symphony and language it self became more adult so to say, but developers...
People who never tried anything except PHP are usually weaker in programming and ecosystem knowledge than people who tried something else, python, perl, ruby, c for instance.
Summary
PHP as any other programming language is a tool. Each tool has its own task. Consider this and your task requirements and PHP can be just good enough solution.
"PHP is shit" - usually you heard that from people who never write strong applications on PHP and haven't used any good tools like Symphony or Laravel.
Cheap developers, - the bigger community, the more chance to hire cheap developers, and more chance to get bad code. That can be applied on any other language.
PHP has professionals developers, usually they have not only php on scope.
That's all folks, this is very brief, I am not covering php usage early days in details, but this is good enough to understand the point.
Enjoy.8 -
I joined a "multi-national" company in middle-east where 90% of the developers are Indian. And since it's a "multi-national" company with 50+ developers I thought they already figured it out. Most of them have 5-10 years of experience. They should know at least how to use git properly, deployment should be done via CI/CD. database changes should be run via migration script. Agile methodology, Code Review - Pull Request. Unit testing. Design Patterns, Clean Code Principle. etc etc
I thought I'm gonna learn new things here. I have never been so wrong in all my life...
Technical Manager doesn't even know what Pull Request is. They started developing the software 4 years ago but used Yii v1 instead which was released almost a decade ago. They combined it with a VueJS where in some files contains around 4000 lines of code. Some PHP functions contain 500+ of code. No proper indentions as well. The web console is bloody red with javascript errors. In short, it's the worst code I've seen so far.
No wonder why they keep receiving complaints from their 30+ clients.10 -
Today I get off at 1pm. Because of weather conditions. I swear i love this job.
Gonna pick my baby girl from the daycare at a good time. Head home, get us some hot chocolate and learn more about Smalltalk while mom gets home.
Today is gon b a good day.
Awwww yii3 -
From my last job interview (which I got hired btw)
Lead developer: "so we see quite a lot of frameworks that you listed for php, Laravel,cakephp, codeigniter, we really like the idea of them but have not had the opportunity to use them since as you might know by know our pages run over basic and small scripts, you also listed some cool front end frameworks, react looks amazing and I do have somr experience. Tell me, if given the choice, which framework would you use for php?"
Me: Really depends on the project, but the ones that you have described previously seem that they would not really benefit from them, we should not use them if they are overkill or will not expand to anything else on the future"
Him: "But given the choice?"
Me: my own framework, completed it a couple of days ago, it has its own routing system and everything made by yours truly, used it before on some projects in which the developers work with it with no need to ask me about stuff, the documentation is sound and the code rather simple. Php is and can really be all you need depending on what we are talking about."
Him: **stands up, moves closer to me and fist bumps**
"All right now moving on, i was wondering abouy redux, what are the benefits of..."
Walked out of there like a boss, it got interesting when we started talking about Lisp, apparently they are interested in putting some Clojure to test in small things since they want to learn new things and apply them. Yup, this gon b good!!4 -
First day on my first job ever, the boss asks me what I want to do. I indicated that I had some experience with php and the yii framework (which was at some point very cool xD), so I wanted to start with something like that. And so it goes: after two days of watching laracasts (which is an awesome platform by the way! :O) I got assigned to a project.
Now the company I work at uses some kind of self built system that tracks how many hours are spent on which project, and compares that to how many hours was estimated implementing a feature would take. That's cool, but then I saw that for the project I was working on the time estimated was 5 work days. This was the estimate for both designing the interfaces and implementing both front and backend. I knew in advance that this was probably way to little time for me, but didn't want to come over as the new kid who can't do shit x)
Anyway, I started on the project and was having fun, but the biggest time consuming aspect of the project was not necessarily that I didn't have enough experience: it was that the developer who started this project and made most of the design choices had written some very messy code, without tests or apparently any refactoring. Also, everything was extremly inconsistent and not according to all the best practices I just watched in my laracasts spree.
So fastforward a little: we're way over the estimated hours. Yay. Now suddenly the boss comes by with an almost angry face that the client is becoming angry and we need to finish soon. He makes it entirely our (me and the front end guy) problem and I just decide to say nothing and try to work faster.
Now I'm stuck writing fugly code on top of more fugly code and when I mentioned to my front end guy that I was almost finished with feature but I only needed to finish up the tests, he said something like "oh just don't write tests, that'll take too long"... Is that really the mindset of this company?! No wonder the project I work on was in a very bad state.
Thanks to devrant I see now that I just need to say something if I know that I won't be able to complete something in a certain amount of time and that other people are just like me (thank god). :) I think I'll need to post more rants to vent my frustrations x)5 -
Wow, after 4 years of working with PHP, and now working with NodeJS and ASP Core, I gotta admit that PHP is pure shit.
It's really awesome to see the documentation provided for NodeJs and ASPCore.
75% of PHP documentation isunreadable crap. Every fucking variable starts with a fucking dollar sign, wtf! How unpleasant is to read that. And holy mother of god, why concatenate with a dot ? We all know "+" means "add, aggregate, etc". PHP is unreadable as fuck. Fuck laravel, fuck Yii, fuck Composer.
Seriously guy, move to NodeJs or AspCore. Both of them are pretty good.16 -
I believe Common Lisp people are up to something:
http://lisp-lang.org
and
https://www.quicklisp.org/beta/
......I ak fucking stocked at this way of coding making a comeback. I wonder if It has anything to do with M.L being all the rage now a days.
Oh well....M x slime3 -
Google translate is very(very) good at translating Chinese text....but it will fuck up translating despacito(if you don't know that song count yourself lucky...it flipping sucks but i used it for comic relief)
Wth Google how?
Guess Skynet is not a reality.
Chi-Net is.
Badum tsssss14 -
Well thus far is a bunch of rails small jobs. Funny enough this week I managed to get a bunch of php contracts "with the possibility to extend for larger contracts"
I am not really interested in long term contracts, but being that most developers that I see hired for small php jobs are not used to the patterns of development used for modern php and that i bring in a lot of my own stuff for it I know that I will be maintaining them for the long run.
So good stuff. Lets see how the week pans out. Getting really excited. Even tho I see more horrors in php than even on JS or ASP.NET or Java I still really love all languages that I have used. And normally I work like a mechanic. In which I bill by the hour(i am an expensice hooker...I mean developer) and finish everything as fast as possible to let me lazy around the house. So for example, if something takes 10 hours I will do it i 5 or less and charge all 10 hours, or I would charge per build(custom login and registration that kind of deal) and yeah. Pretty basic.
Good shit man!1 -
Wohoooo got my s9 on the mail today aaaaaw yii
This thing sure is puuuuurty. Working like a charm as well.
Didnt really wanted to part with my s7 edge since the phone is working just as fine as when I first got it. Never had an issue with the phone but....well....I am spoiled.7 -
Just realized that after 3 months of continuous samsung s9 use my phone is still as fast as it was when i got it out the box.
Man I love this stupid phone so much. Everything opens up so fast and this sob is as smooth as an iphone when it comes to the speed.
Pure goodness. Still would like to try a more pure Android environment u know? Like back when nexus was still a thing. I don't really dig the pixel phones too much but know that I am on a more open carrier and I can use phones like the one plus series I think i know what my next phone would be.
Nothing personal samsung, you have been good ans loyal, but i want to play with more phones.
I really love smartphones.2 -
HOD keeps coaching me in regards to my new role as a manager for my institution. I really like it, the man has a lot of knowledge and would show me stuff that not only deals with my job, but his as well. Thus far everything has been working rather smoothly, mind you, i have been acting manager for more than 6 months thus far, but they just made it official after our vp conaidered that most of the applicants for the manager role were not as qualified as I was, kinda had the advantage since I wrote the job requirements.
All in all it has been fun, stressing, but fun. -
Me and the dba are slowly migrating parts of our JVM stack into .NET AND even tho I love and will always love Java and its ecosystem....I am glad.
IIS as a server is something that I actually look forward to since deploying shit to it is always a breeze
Installing ssl certs is a breeze
Everything is a fucking breeze
Before any of you cocksuckers say anything: this is my opinion only5 -
Teacher asks me to join him for a web app development.
First stages, I have to dig deep into a framework I don't know (He doesn't know it too, and I know that learning is the only way to step through)
Month goes by, began developing some mock-ups, he says he didn't like it, sends me a website made in fucking Wix. Seriously?
Fast forward another month, tonight I'm coding some stuff, he stills doesn't know how to fucking use Yii. fml4 -
A coworker brought a French press as well as kettles and everything to our office.
Thank heavens for coworkers like this.
The coffee tastes fucking delicious.1 -
!rant
Digging though my old emails found this joke sent to me long time ago. Think that originally was posted in a 1997 issue of Computerworld. Maybe you already suffered the effect of the "Opcodes" listed here. Hope that !tl;dr
ARG Agree to Run Garbage
BDM Branch and Destroy Memory
CMN Convert to Mayan Numerals
DDS Damage Disk and Stop
EMR Emit Microwave Radiation
ETO Emulate Toaster Oven
FSE Fake Serious Error
GSI Garble Subsequent Instructions
GQS Go Quarter Speed
HEM Hide Evidence of Malfunction
IDD Inhale Dust and Die
IKI Ignore Keyboard Input
IMU Irradiate and Mutate User
JPF Jam Paper Feed
JUM Jeer at Users Mistake
KFP Kindle Fire in Printer
LNM Launch Nuclear Missiles
MAW Make Aggravating Whine
NNI Neglect Next Instruction
OBU Overheat and Burn if Unattended
PNG Pass Noxious Gas
QWF Quit Working Forever
QVC Question Valid Command
RWD Read Wrong Device
SCE Simulate Correct Execution
SDJ Send Data to Japan
TTC Tangle Tape and Crash
UBC Use Bad Chip
VDP Violate Design Parameters
VMB Verify and Make Bad
WAF Warn After Fact
XID eXchange Instruction with Data
YII Yield to Irresistible Impulse
ZAM Zero All Memory -
!rant
We got a new Macbook pro, 2017 model, i was all excited for it, my 2 coworkers and the manager not so much. But being that I am the only one that knows how to use it and will be working on new web related tech as well as advising our contractors and helping them with the ios and android part it was decided that I shall use this baby. So fucking excited. I get to use this baby at work as well as the overpowered work station that they already gave me :] dis gon b good manerant gon buy another one eat it fk it i already have one at home aewe yii it came with everything not mine tho love me a macbook didnt pay for it1 -
tl;dr never heard about rubber duck debugging before devrant
i didnt worked with Yii fw in the past but we bouth a site written in Yii and i wanted to add a form but could not pass the model to the view so i went for a smoke with my roommate to think about it
"i have the view, i have the model, the action but dont know how to pass the model variable because its an existing view..."
"...it should be passed to the render function in the existing index action but thats written somewhere else, so if i could pass it there..."
"...i can write the action there and then i should pass the variable to the render function in the index action and goddamit, so thats how you do it, thanks mate!"
he stared at me like wtf? o.O
room mate debugging ftw!1 -
I don't know if something changed on the go linters, the spec or whatever.
...... but I am so fucking glad that I don't get retarded "eXpoRteD FuNctioNs neeEd tO bE coMmenTed"
Fuck how I hate how these tools operate sometimes4 -
Aesthetics are important
It had been a while since I had a look into the Yii framework. Went into their website today. I was surprised to see that they had changed the design of a lot of it. This is particularly good since I believe that one thing that really makes devs(particularly web since most of us are full stack) ignore a tool is the presentation of it on its respective website. That being said, it is really hard for any PHP framework to go ahead and compete with how really good looking and easy to navigate the Laravel website is.
I know this might seem as a shallow thing to look at. After all, a tool can be amazing and have a 90's looking website, and this happens a lot in certain communities. But all in all I am pleased that the Yii framework website is looking as good.
Then again Rails(the Ruby framework) has a "looks like a toy" website and the framework is really powerful and advanced. -
I tried to convince my boss that choosing ruby on rails would be a great framework for the projects they want me to develop. I even put together a presentation to show why it's capable.
I did it because I've completed a great course on coursera, and wanted to gain more experience in real projects.
Yet they've dismissed the idea cause there is noone else working at the company who has any competence in rails, so I have to do all the work in yii. There are lot if similarities between the two framewoks but I have no interest in php and I haven't touched php in like, 8 years...
Need to find a way to practice rails in the meantime.1 -
Fuckadoodling finally!
After 3 days of digging through the documentation of CraftCMS and Yii Framework I got the hang out of how these Controllers, Actions and other RESTful api stuff works on Craft3.
As some of you may have noticed, I am a big fan of CraftCMS (v2) since it was introduced to me. A few days ago we discussed a new project and the option go for Craft3, as it has been released for some time now.
The changes from v2 to v3 are huge... I didn't expect to almost reach my limit to give up on it!
But since the RESTful routes finally work, with proper data serializing and all, I will now go drink a Whiskey or ten and wish you all an awesome, client-disturbance-free, decadent, beerful weekend!
Cheers mateys!
🎉🎊🍭🥃🥃🥃🍻🍺🥂 -
If I understand a different programming language that doesn't mean that I can easily code in that. Currently working on PHP Yii now. My expertise is on C# btw. lol3
-
Quess who's back again, php oudated piece of shit monolith codebase. So we have a relatively huge client we need to migrate to AWS.
It is written with yii, all object-oriented. The way it's implemented makes me question my love for object oriented as well my sanity for even accepting this project.
I probably could talk about this piece of shit for hours but the fact they save 3 gigabyte of qr code images is the fucking worst. It's literally a few one hundred thousand images who could be generated on the fly.
Please for the love of god, let me finish this migration tomorrow.4 -
!rant
I approach programming with a lot of resentment since I am aware that all of us can have MAJOR fucking shifts in the way we do shit from one year to the other.
Let them find out about a different kind of architecture which uses fart propulsion as a form of interpreting machine code and everything becomes absolete.
And then we are only left with FartScript(Oracle TM)
There would still be node though(he he) -
So yii 3 is basically a clean up of yii 2 from all built-in extra library, and devs are free to include those with composer. No?5
-
Anyone herr tried API Platform?
I know I know. Generic ass name but that is what the framework is called.
Its in php, it contains a lot of goodies from(try and guess...no?? Ok I'll tell ya) the Symfony platform(go figure right) so if you are familiar with Laravel or well....Symfony then I guess that you will be good to go. I ain't...so fuck me because I only know Laravel.
Either way the concepts are very simple. Configs is donde almost entirely with YAML, i dunno how to feel about that, not used at writing routes on yaml, but the framework is thus far quite powerful. About to test jwt auth so wish me luck!4