Why aren’t my preview cards being generated?

So, the way the “preview cards” work, is that the provider (facebook, twitter, Slack, etc) hit that URL with a special network request.

The application return to them a very small snippet of HTML, which they ‘sanitize’ to make sure it’s safe (of XSS, SQL-injection, etc). If they consider it safe, they display that snippet of HTML

A quick way to test it is to use https://cards-dev.twitter.com/validator

Individual contributor

I have been a QA for a while now, and enjoy it. When someone asked me if I wanted to move into coding- as in doing development. I didn’t think twice I just said ‘no, I like breaking stuff”. Its more funner. 

Being the solo QA has its drawbacks. Though I am part of the team, I am still an ‘individual contributor’ . When hiring is done for the team, example a developer, I am not included in the process- you know stuff like that. Or, if the team is going out for lunch, it’s usually the developers who hang out. 

Does it upset me?. I would lie if I said ‘no’. It does, but it effects me lesser with each passing year. Its good for me, but bad for the team. 

I am more than happy to be left alone- most of the time. No small talk, no fake laughs for jokes I don’t understand. And no trying hard to be accepted. No voicing opinions when I am not comfortable. 

Yet, when I do go out with the team, I always feel like I am the different one.  I think road trips , cross country trips are cool. I love camping, I think juice and sodas should be remove from the refrigerator section 😉 . I think we all should use our mugs and cups for coffee. I think we all need a water bottle for water. 

I think this is one reason which makes me wonder if I really care for the job. For me job is about the people. Or maybe I am not challenged by the job enough. 

My manager said this on my 1:1 ” i really need to include you” . I felt like this was really not my problem, maybe its his. He needs to do a better job at team building. I also feel it came up after I started working “away’ from the main office and doing my own thing. If the people are not a team, why do i want to go in? I might as well work and communicate via skype like we always do. 

Anyways, is it bothering me? Ofcourse it is,hence the post. But its bothering me lesser. Job is fun if the people are fun. If the team is fun. A team is fun if the manager makes it fun. There I said it, its not me. 

 

Installing chromedriver to run with selenium webdriver on mac

Struggled a bit to have this up and running, so here are some notes!

1. Download chromedriver from here

2 Unzip it

3. Drag it to /usr/bin ( to locate /usr/bin : go to finder, from the go menu go to folder )

You may need to right click on the chrome driver and open it, this is because sometimes on Mavericks if the app is unsigned it doesn’t execute, so you will have to specifically run it.  *

 

4. Restart your system (don’t ask me why 🙂 )

5. Update your properties file to request your webdriver to chrome

*Running an unassigned app on mac

  • To override your security settings and open the app anyway:

    1. In the Finder, locate the app you want to open.

      Don’t use Launchpad to do this. Launchpad doesn’t allow you to access the shortcut menu.

    2. Press the Control key, then click the app icon, then choose Open from the shortcut menu.

    3. Click Open.

Code review etiquette

With the process of submitting for code reviews and also doing code reviews, I’ve jotted some  etiquette or “time saving” tips if you will, on the process. This is going to address more of the interpersonal skill part of it, than the technical aspect. I am avoiding addressing the technical aspect of code-review since well, in my opinion there are a zillion ways to address a technical problem, and each coder assumes she is taking the best approach. It sucks that I lost my ace reviewer, it was fun knocking that extra line of code and seeing a beautiful piece of code checked in.

As a reviewer: 

1. Please be prompt with the code-review. There is someone waiting at the other end to submit a change.

2. If a “modification” goes beyond an iteration or two its either time to draw up that chair and share the cube  or pick up the phone and discuss.

3. When providing feedback, please be specific, its best to provide examples in terms of code. That way you are making it clear to what you as a reviewer expects.

4. Be kind, as a reviewer you may come across a lot of levels of coding capabilities. Some reviews may just require simple changes to make the code more readable, and in others it may need major  code refactoring.

5. If you are just starting to code review someone’s code, then don’t pick on ever thing that you think ought to be changed. Start in steps, once the submitter improves on the code, increase the level of expectation.

6. Please don’t file bugs for every enhancement, lay it out as a suggestion that the submitter can think about, if the change is mandatory, then please file a bug.

7. Please encourage the submitter for good work done. This keeps the tone positive.

8. When discussing ‘problem solving’ from [2], start off my asking the submitter as to why she preferred the approach rather than assuming that your approach is the better way.

9. If you think the submitter is not clear about what you are trying to convey, take the initiative and say “let me know if you need help”

10. Have fun as a reviewer. There’s always something to learn from someone.

As a submitter: 

1. Please give your code  a thought, the reviewer is taking time out to help you better YOUR code.

2. When the reviewer suggests something or files a bug, try not to take it personally!

3. if you think some change is not required or can be held off in another CL, start a discussion and state your reasons clearly.

4. Involve the reviewer, if you are unsure about something, take the initiative and ask her what she thinks about it. Remember reviews are about collaboration.

5. Don’t forget to have fun. Remember its your code. Make it pretty, make it functional, also keep it clean.

Me: Wow look at those patents.

Co-worker: Makes it all feel so impersonal.

 

 

CSS selectors and selenium (webdriver)

When I started automation with selenium, I started using xpath, because that was the way to go. Till, when I moved companies, there was this talk of other QA engineers relying on CSS for locating elements from the DOM. I have recently started using CSS locators for various reasons. You can read about it here

I have been basing a lot of my locators on these very cool links

1. Are you ready to use CSS with selenium?
2. Multiple classes and ID’s, CSS- trips and tricks.
3. CSS selectors demystified from Sauceio 
4. Multiple classes and CSS by Maxdesign
5. Can I use this ?  Search
6. Css Rosetta stone and cookbook.
7. And my favorite of all, convert your Xpath to CSS using this link here.[cssify]

Some examples:-

  1. Spaces in classnames: So if you have a class name like this ul class=”A B”, you can do a ul.A.B
  2. Lists can be tricky: Here’s a pointer:
	<li class="shrUPGrid">
           <ul id="sfly_5" class=" shrSG shrSGSelect">
<ul>
	<li style="background-image: <span class=;">url(https://sphotos-a.xx.fbcdn.net.jpg)"></li>
</ul>
<ul>
	<li style="background-image: <span class=;">url(https://sphotos-a.xx.fbcdn.net.jpg)"></li>
</ul>

You can find the Li by

 findElement(By.cssSelector("li.shrUPGrid > ul > li:nth-of-type(""
							+ pictureIndex + ")")).click(); 

where pictureindex is the index of the li

If I am sounding all cryptic please don’t hesitate to drop me a line.

Because “Eclipse” is sorta lame that way.“Import cannot be resolved”

I synched up with depot OUTSIDE eclipse, and then restarted eclipse and bhoom *scream 32 errors. I did this a few times, and a few more and I still saw those damn errors. I almost swore off my co-workers, till. … I did what any self-sufficient coder does. I googled . And this is what I found. Voila problem solved. Cleaning the project and refreshing it seems to have fixed the problem.

Thank you Sherif Mansour