galbenu.ro

Should a developer care about the business?

Jan
10

Yesterday I was in a meeting with my team lead (backend dev), another backend dev, a business analyst and a designer. The designer kept asking questions about the admin panel of the app, about the technical limitations, what is out-of-the box and what not so that she can design a solution that will not be too creative for our limitations.

And after the team lead answered all her questions and the meeting is over, the other backend says (with an annoyed voice):

“Why should I, as a programmer, care about the business. Why do I need to know about all of this stuff. I know PHP and that’s it. How can we create high performance if I care about the business”

At the time it just seemed odd to hear that from a programmer (and a backend, no less), but I said nothing. I just paused. Now, a day later, after I processed the words I ask: How can you not care about the business? How can you provide the client with the best possible solution if you do not know and understand his business, the roles, the client types, the products, the categories – everything that is business related? How?

Log: How I learned, little by little, Magento 2

Jan
08
This post is in progress. I am updating it daily.
It was started on January 3rd 2017. Not sure when I will finish it

 

Let me start with: I worked with Magento 1 and I am willing to learn Magento 2.
I am learning about Magento 2 + Docker

Day 1: I hate it

Day 2: I will give it a chance. Maybe is not that bad

Day 3: Maybe I was lucky enough to learn Magento 1 from the right developers. I hate Magento 2. It is sooo slow!

Day 4: Learning how to add a new attribute in PDP (Product Details Page)

Day 5: Learning how to change the PDP layout:

  • Lesson 1: Check the admin: do you have the right theme applied?
  • Lesson 2: Did you flush the cache?
  • Lesson 3: Do you have the right layout?
  • Lesson 4: Did you read the Docker docs? Some devs might say that Docker is not for devs, but for devOps [what does devOps stand for?]. How can you work with Magento 2 if you can not set it up? How can you run a command from terminal and not know what it does? You just type commands blindly?

Day 6: in day 2 I should have read (more) about Docker!
Start here: https://docs.docker.com/get-started

Day 7: How do I run multiple projects on the same host without stopping the containers? Need to read about posts!

Day 8: I have now “progressed” to creating categories (the category tree) in Admin.

Go to Admin > Catalog > Click Default category (if you want to create a main category you actually need to  create a subcategory of the “Default category”) > Click “Add Subcategory” button (grey button on the left side) > Enter name, pick display, set permissions (if you have different groups) > Save (orange button on top right) > refresh page

How to make a developer feel unwelcome

Jan
04

It’s December 15th 2017 and I am happily starting a new job that promises a lot.

I arrive at the office around 11am. They usually start at 10, but since here no one really comes in time…

As I said, I arrive around 11am and I go straight to the HR department (because HR is the only contact I have). There I am invited to sit at a desk until the IT guys will bring my laptop because they do not know what my project is going to be nor what team I am part of. I know I am frontend and I will work with Magento2. 2 minutes later the IT guy comes and says:

“Let’s go to the other floor. There’s where you’ll live”.

We arrive at my desk, I see a laptop (with a nasty scratch on the exterior of the lid). It looks kind of old to me, but I think maybe I should not complain from the first 30 minutes. The It guys helps me connect to the wi-fi and hands me and envelope saying: and this is the envelope. He sounded as if I knew what that envelope is. Again, I don’t ask about it, thinking i will figure it out, or maybe it is self explanatory. Then he leaves.

(more…)

The consistent Petr (part 2)

Nov
29

In our project we have this Sentry integration that would let us know when something goes sideways (I am sure most devs know what I am talking about).

About a moth ago (all of devs and dev-ops) have missed one notification (we were all in a meeting an ignored the email) and live site was unusable.

Ever since I made a rule (for myself) to put the errors in a common Slack channel for all the devs to see. All good, no one was bugged.

A few days ago, Petr makes this announcement:

“Note – it seems that current errors from production are maybe false-positive and they are not affecting user. Sentry integration will be updated shortly.
Second note – even these errors may be false, we will still take a look into them.”

Today I see tow dozen errors in my email  and I notify the devs, that maybe something went wrong, as there are too many different ones. If they are nothing than only 5 mins of our lives were lost.

To my notification I get this from Petr:

Yes, the FE errors on production were mentioned on stand-up and also in #frontend channel. They can be false positive, due to complications with Sentry integration.

There was no mention of said errors in any of the stand-ups this week or past week.

The consistent Petr (part 1)

Nov
29

This morning, when I got into the office, I was surprised by my tester who said that none of the bugs I’ve put in for testing are fixed. Imagine my amazement when I checked the bug-branch I was working on and the testing-branch and they had very different code! So I go to Petr and:

Me: hey Petr, did you get any conflicts when merging the bug-branch into the testing-branch
Petr: Yes. But I fixed them. I kept the testing-branch code
Me: You should have kept the bug-branch code as it was the newest one (and I added it to fix some bugs reported on the testing-branch)
Petr: Yes, yes. That is the one I used.

Half of the day has passed since and we still have different versions of code even though the bug-branch was merged into the testing-branch…Petr is on it (fixing).

What is a senior developer?

Nov
28

There was a very interesting discussion in the office today about what a senior developer is (we were talking about JavaScript developers, but I guess it could be applied to any programming language).

I was saying that there is no possible way that a developer can be senior after only 2 years of experience. There is simply not enough time to meet the unexpected. And that is what, in my opinion, makes a senior: the unexpected. The ability to not be surprised and blocked. That is when a developer becomes senior.

There were of course voices that said that 2 years is more than enough. And it only depends on how passionate you are (how can passion be a factor in establishing seniority?). Then there was a slip from someone who said: if you convince your current employer to make you a senior, than you can put it in your CV and the next job recruiter would have to take you into account for a senior role. That made me think: hm.. sneaky one. So you you put it in your CV just for to market yourself? So the seniority became just a keyword? Who is to blame for this? Can we fix it?

About 3 years ago someone estimated that the number of programmers doubles every 5 years. I suppose then, there is this need of making oneself appear “seniorer” than the rest. But is it fair? and I mean it. There are senior developers with less than 2 years of experience and less than 25 years of life who participate in technical reviews during interviews (and I mean it because I have seen it) and they evaluate people that have more years of experience then they have of life, only to conclude that the respective developer is not good enough. I guess I am a bit afraid that I will one day be evaluated by one of these. And maybe I am more afraid of my reaction to it. I am afraid that I will try to impress this kid into hiring me. Is this ok? Is there something wrong with me? Are there any others like me?

 

How to change splashscreen and app icon on Android w/ Ionic

Jan
26

First, Ionic is kind of stupid!
Now let’s make it smarter:
1. go to: /usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/lib/resources.js
2. change cacheImages property to false
3. remove android platform
4. re-add android platform
5. regenerate resources
Now Ionic is less stupid!

And in config.xml make sure the code is configured as follows:

<icon src="resources/android/icon/drawable-ldpi-icon.png" density="ldpi"/>
<splash src="resources/android/splash/drawable-port-xxxhdpi-screen.png" density="port-xxxhdpi"/>
<preference name="SplashScreen" value="screen"/>

How do you edit in vim, on Mac?

Jan
18

You press the “i” key, because the mac does not have an “insert” key.

(On windows and linux you press insert)

Images Aspect Ratio and Google Chrome

Jan
18

Google Chrome does not know how to maintain aspect ratio of images if the parent has “display: flex”.

In order to make it work and display the images in a responsive manner, the image must be contained in  another element that has a width/min-width/max-width. Then also set max width and height for the image itself.

Here is a sample:

HTML:

 

 

CSS:

.image-container {
width: 50px;
}

img {
max-width: 50px;
max-height: 150px;
height: auto;
width: auto;
}

Rename branch in GIT (on local)

Mar
04

If you want to rename the current branch use this command:

git branch -m "new-branch-name"

If you want to rename any other branch use this command:

git branch -m "old-branch-name" "new-branch-name"