Details
-
AboutTechie & front end dev
-
SkillsAnything I can learn
-
LocationLima, Peru
-
Github
Joined devRant on 1/28/2018
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
-
That I don’t communicate well enough in English.
I’ve been working with teams that only speak English for a couple of years now, but I don’t feel that my conversation level is quite there yet. I’ve been getting better at it by, chatting with teammates, making notes before meetings and organizing my thoughts, but I’d like to get even better to improve myself and be more useful to my team when the time comes to deal with a complex bug that involves many people to solve.3 -
So, it's been a while since I've been working on my current project and I've never had the "luck" to touch the legacy project wrote in PHP, until this week when I got my first issue.
And damn, this goddamn issue. It was a bug, a very strange bug, that only happens in production and that nobody has any idea what was happening, so yeah, I didn't have anyone to ask and I got less time than usual ( because Thanksgiving ).
And thus, I have no starting point, no previous knowledge on PHP and less time! I expected a very fun week 😀 and it was beyond my expectations.
First I tried to understand what might be causing the issue, but there wasn't any real clue to star with, so no choice, time to read the flow on the code and see what are they're doing and using ( 1k line files, yay, legacy ). Luckily I got some clues, we're using a cookie and a php session variable for the session, ok, let's star with the session variable. Where it's that been initialize ? Well, spoiler alert, I shouldn't start with that, because my search end up in the login method of the API that set a that variable and for some reason in the front end app it was always false and that lead me to think that some of the new backend functions were failing, but after checking the logs I got no luck.
Ok, maybe the cookie it's the issue, I should try open the previous website on the brow...redirect to new project login, What? Why ? I ask around and it's a new feature push on Monday, ok I got Chrome Dev tools I can see which value of the cookie it's been set and THERE IT WAS it has a wrong domain! After 2 days ( I resume a lot of my pain ) I got what I've been looking for, so now I should be able to fix the bug. Then where is the cookie initialized ? In the first file the server hits whenever you tried to enter any page of the app, ok, I found the method, but it's using a function that process the domain and sets it correctly? wtf ? Then how in heaven do I get the incorrect domain ? Hello? Ok, relax, you still have one more day to fix this, let's take it easy.
Then, at the end of the Wednesday, nope I still have no clue how this is happening. I talked with the Devops guy and he explain me how this redirection happens and with what it depends on, I followed the PHP code through and nothing, everything should works fine, sigh. Ok I still have 2 days, because I'm not from US and I'm not in US, so I still have time, but the Sprint is messed up already, so whatever I'm gonna had done this bug anyhow.
Thursday ! I got sick, yay, what else could happen this week. Somehow I managed to work a little and star thinking in what external issue could affect the processing, maybe the redirection was bringing a wrong direction, let's talk with the Devops guy again, and he answer me that the redirection it was being made by PHP code, IN A FILE THAT DOESN'T EXIST IN THE REPOSITORY, amazing, it's just amazing. Then he explained me why this file might be missing and how it's the deployment of this app ( btw the Devops guy it's really cool and I will invite him a beer ) . After that I checked the file and I see a random session_star in the first line of the code, without any configuration, eureka ! There was the cause and I only need to ask someone If that line it's necessary anymore, but oh they're on holiday, damn, well I'll wait till Monday to ask them. But once and for all that bug was done for ! 🎉
What do I learn ? PHP and that I don't want any more tickets of PHP 😆. -
So for the past two days I had to deal with a problem where I have to do a nested query with sequelize, pretty straight forward reading the documentation, or that was I think. I implemented everything according to the docs but the query stills fails, why ? I had no idea, I double check my implementation, I googled the error, no luck, after a day searching like crazy I talked with the backend lead about this and he help me to realize that the naming convention was changing because sequelize is creating a nested (SELECT * FROM) because one of the relations has a one-to-many realtion with the root model and I'm why the heck is doing that? But we both didn't know, and the problem was solved by just modifying the names, so we let it through, and sent it to QA. The next day I see the task rejected by QA and the reason was after the changes were merged another part of the app was broken, ok np, I'll fix it right away, and oh God I found the error was caused by another query that was including the first query we fix yesterday ! It was a nested query with 3 lvls! And the names became even more complex ( like `model1->model2.colum1`), goddamit, ok, I spent most of the day searching again, nothing, read the specification of the findAll function, nope, tried to put that name in the ON clause as the docs suggested, still an error, shit, then the lead helps me again and creates a literal which can hold that name and voila! Everything is happiness, at least for that moment, but I was still curious about this behavior, so I keep digging on it and I've just found an issue where a great guy posted an option to the findAll method that is not documented in any version of sequelize ! WTF ! And this option was "subQuery" which if you set it to false it won't create that additional (SELECT * FROM) from before, FUUUCK! I can't believe it, I know that all the effort works in my favor because I learn more about sequelize, but FFS I'm still angry because this shit shouldn't happen, you need to update the god damn docs, it's just adding a row and telling the people what it does. Well to end this, after putting that in the query and replacing all the workarounds with the expected syntaxis everything works like charm.1
-
So after 3 months of working ( which implies a 2h trip from home to get to the office ), going to college ( another 1h from home to get there ) and making a thesis to get a fucking Bachelor degree. I'm kind of done with everything except the job. I mean, I can't focus seriously in anything besides coding. So my question for you guys is, How do you get the important stuff done even if you don't wanna do it ?
-
So I take an English test at work last week. Today I got the results and I found this at the end. ( context: I’m a humble Peruvian trying to get better at English :) )4
-
My first project it’s an emotional roller coaster. I was a little trainee/ junior dev at my job with a little more than a month learning RoR and one day my tech lead receives an email from the big boss saying: “We got a big client who wants a total redesign of his web and we said yes we can do it in a month, so please check if anything it’s reusable”, after reading my tech lead said to me “Do you want to help me with this ?” And well, we spend like 2-3 hours checking all the controllers, views, assets, etc. We conclude that the project was mostly front end changes and the back end will stay the same, so yeah it can be done in a month. The next day in a meeting with all the team I was nominee to be the person in charge of that project, because it was an easy project and all my teammates hate to do front end stuff, so I take the challenge. After that I met the Project Manager, another guy who recently start as PM about a month, so yeah we were two new guys who need to handle the project of a big client, nothing can go wrong. We did the planing, I give an estimation ( first one in my life ) for the tasks and added like 4 hours in case anything goes wrong. Then the first sprint came by, and I couldn’t finish it because the time given to some features was to low and the “design” was a mockup made by the PM, ok, no problems, we add more time to the tasks and we ask for a real design. At the half of the sprint the client start adding more and more stuff, the PM doesn’t talk back, just say yes yes yes. Then in a blink of an eye the easy project became a three months projects with no design at all, two devs ( a new guy who recently begin as dev enter the project ), just mockups and good hopes. But somehow we did it, we finish it! Nope. The early Monday of the next week I received an email of the PM saying we would have a second version and the estimation of the tech lead was a minimum of six months ( that became 8 months). This time was hell, because the client doesn’t decide what the hell he wants so a task would take a couple of days more or so, the PM became the personal bitch of the client, but it wasn’t his fault, because we later knew that the company became partner with this client and because of that the PM didn’t have too much choice :/, the designs were cool, but they weren’t on time ever, our only design guy had to do designs to our project and another 5 projects of the company, so yeah, we weren’t the only ones suffering. At the end we survive, the project was done and the client somehow was happy. Of course the project didn’t end and it was terminated half a year later, but I’ll always remember it because thanks to this project I was given the opportunity to work as a Front end dev and I’m happy still working as one.