G33K-TRICKS: Others
Showing posts with label Others. Show all posts
Showing posts with label Others. Show all posts

Tuesday, November 30, 2021

How to solve "C: Indent when one step more than case" error.


 

[SOLVED] How to deal with "C: Indent when one step more than case." error from Rubocop


Below is the problem statement.
Problem:
C: Indent when one step more than case.
Rubocop throws this as an error when we have a indentation issue. 
Ruby scripts have indentated code and a missing indentation makes compiler grumpy. To resolve it we just need to have a space before starting the when clause.
Below the simpler way to look at it and how to resolve it.
Solution:

@bad Code
case platform.downcase
when 'android'

@good Code
case platform.downcase
when 'android'
Get Amazon Gift Cards for your friends and relatives: here

Wednesday, June 17, 2020

How Google tracks website ads clicks


How Google tracks ads click

How Google tracks ads click

 Here are some ( but not all ) via which Google can detect fraudulent Clicks and as webiste or blog owners you should avoid them:

1. IP Address:

The primary source of your presence on Internet is your IP address. Google search engine checks which IP address that the click has been initiated from. If it has been originated from the very same IP address which was previously logged in to the AdSense account or any other account of yours like Gmail, Blogger,  then you’re commiting a mistake by clicking the ads on your own website. If the same IP address is constantly clicking ads on a website, then it might be either invalid clicks or click fraud.

2. Cookies:

Lets speak about dynamic and static IP addresses. When you connect to the internet, a DHCP server assigns a IP address to every machine it serves. This ip addresses are dynamic in nature , i.e they change every time you connect to the internet. There are other parameters too in changing the IP like reconnect or lease time. That is why you have different IP address when you go online. But some people use the static IP address which is bind to the machine they use. 

However, if Google has implemented a cookie on your computer, simply getting a new IP address won’t help when you’re committing click fraud. As the cookies contains actual user details.

3. Click through rate (CTR):

Usually a website's CTR  does not go above 10%, it hovers between 0.5% to 9%. If a website is receiving a CTR above 10% that means the website might have a unusual activity and big G -AdSense might have to ask a real person to review the activities going on the website and they will confirm if any terms or condition is not broken. Once they find any fraud activity , AdSense account will be blocked. Unless you are not breaking any terms, you are good boy in the eyes of Santa.

4. GEO-location:

Kind of like IP addresses. Google knows from where the clicks are originating and will most likely see a pattern if one comes up. Let’s say you’re smart enough to use different P addresses to commit click fraud, but you’re stupid enough to place all your computers in one town. Google analytics is one tool that can give you an idea how GEO-location targeting works.

5. Your hardware address (MAC address):

Every computer has its “fingerprint” which is a MAC address. This address is put on your hardware instead of your software, so it never changes or goes away. It is possible that Google might track invalid click this way, but not very likely since they have more advanced ways.

6. Advertiser conversion rate:

The conversion rate of the advertisers are really important. If none of your clicks leads to a conversion, such as a sale, lead, newsletter sign-up or similar for the advertiser, then you are sending very poor traffic. At first you might get hit by smart pricing, after that you might get banned. A low conversion rate for advertisers can be the sign of invalid click.

7. Traffic consistency:

If your website is getting huge load of traffic instead of steady hits from different search engine website, in that case, you can have a little trouble. If Big G detects that the behaviour is indifferent and huge hits to the ads,  then it can mark it as fraud click. If your website is not even indexed in the search engines yet but is still receiving a decent amount of clicks then something must be wrong, and AdSense is the first one to spot.

8. Website/Ads layout:

If your website is using a strategically placed ads layout which would fool visitors to click your ads by disguising them as regular links or some other strategy, in that case - you are walking on thin sheet of ice. You are not allowed to cover or edit your ads, nor are you allowed to make them blend in too well with the rest of your content. By doing so you might be generating a lot of invalid clicks from people who didn’t know that they were actually clicking an ad. You are also not allowed to encourage ad click by saying things like “all the money generated through ads goes to people in need” or “click the ads!”.

Wednesday, May 27, 2020

6 simple tips on how to improve your email communications


Tips on how to write Emails

Tips on Writing Email

I had never thought I would write something about how to write an email in this blog. But recently came across few necessary tips on writing email and thought about sharing them here.
We do all write emails, to our friends, family and mostly for our official communications .Yet, we do not actually worry much about how we write them.
I have got few tips for you on writing emails to the point and not letting the email reader or recipient confuse on why it was actually written.

Tip #1:
Does your mail pass the "So What?" question

 Emails are written with a specific reason in mind. While writting you need to keep it concise and enough information for the reader so that they wont get lost. To make more sense out of your email, re-read your email once its drafted completely and ask yourself, does it answer "So What?" question. From reader's perspective: 'you told me all these info in your mail, so what?", ' do I need to do something about it or take any action item' , 'or will you be doing something about it?'
Make sure you address this information in your mail and change the information as needed.



Tip #2:
Change the Adjectives to Actual Data

Noone likes half cooked information! And if you are just vaguely saying, 'Sometimes it happens' OR 'Few of the items..' OR ' it had improved and its faster now..' , you are trying to express something but not enough to impress. If you dont give the data points with the information, it's not going to leave a major impact on the readers mind. Data is important while you express the staus. 
It would make more sense if you say ' The quarterly results have seen surge of 40%' instead of 'We have improved the quartely results'

Tip #3:
Actually... not to use them

Continuing to Tip number 2, do not use the fillers like "Actually", "Basically", "Generally". They don't make much sense and adds vagueness to the writing. If you can put data here that is well and good, if not, try not to use them at all.

Tip #4:
Listen to your Active Voice

The active voice sentence are described as sentenses where the subject performs the action stated by the verb. It follows a clear Subject + Verb + Object (SVO) construct that's easy to read.  The more you complicate the sentense, the more confusing it would sound to the reader.


Tip #5:
Explain the short-forms

Remember to explicitly explain the short forms when writting them for the first time. For Example, if you are using a jargon CPR , CPC, CTM try to explain elaborate them if needed or mention the fullform next to them like Clickthrough rate (CTR), Cost-per-click (CPC), Cost-per-thousand (CPM).
It would not confuse them and would help the reader understand it better.


TIP #6:
30 or Less

Last but the important tip, try to keep the word count in a sentence under 30. Its not a rule of thumb but just a precautionary measure. If you want to write something like, "due to the fact that.." you can easily replace it with "because..". 
You do not want to have a sentence like below one from the book "Blindness" which itself is 97 words long. If such sentenses are included in the mail, the reader might get lost in the words and might have to re-re-read to understand it.

Jose Saramago, “Blindness.” 97 words:

“On offering to help the blind man, the man who then stole his car, had not, at that precise moment, had any evil intention, quite the contrary, what he did was nothing more than obey those feelings of generosity and altruism which, as everyone knows, are the two best traits of human nature and to be found in much more hardened criminals than this one, a simple car-thief without any hope of advancing in his profession, exploited by the real owners of this enterprise, for it is they who take advantage of the needs of the poor.”

Few more quick one line tips before I wind-up this post...
  • A meaningful subject line.
  • Identify yourself.
  • Be kind.
  • Write it precise.
  • Always Proofread before sending.
  • Don’t assume that your email will be not be forwarded/shared.
  • Seperate formal and informal situations. 
  • Show Respect and Restraint.
  • Prompt Response. 
  • And add the senders names (i.e To list) only after proofreading

Do let me know if you like this post in the comments and share some other Tips if you've.