G33K-TRICKS - Your source to Tips and Tricks

Sunday, April 15, 2018

Google Android P might have been named Popsicle



Android P was first released in March, but it’s still known as “Android P” . Google has not named it yet, But intrestingly, in recent Instagram post from Google, Google has released sets of new 5 wallpapers to their followers. (Yes, google do like Instagram and has 6.2M followers)
Here is the link to Google Instagram: https://www.instagram.com/google/

These wallpapers are more like other Google's fancy wallpaper but among them, one stands different from other . Hope this does ring bells. That could be a hint from Google about the name of next release.


Google P = Google Popsicle




Or Google is just being witty and trolling their followers :)

Monday, October 9, 2017

How to solve "Move`% s` out of conditional. " error.



[SOLVED] How to deal with "Move `% s` out of conditional." error from Rubocop.


Problem:

Move `% s` out of the conditional.

where %s is a Method 

As the method call pointed out at %s is redundant, Rubocop throws this as error. The method that is common under both condition should be moved outside the Conditions as it would be executed in either of case.
Solution:
@bad Code
if condition
  do_x
  do_z
else
  do_y
  do_z
end

@good Code
if condition
  do_x
else
  do_y
end
do_z 

Check Out the Latest Posts

Recent Posts Widget