Skip to main content
 

Seeing lots of 500s and 405s (wha!?) on stream fetch and mark-as-read XHRs

Hope it's just me....









 

 

 

 

Is there an easy way to null-mock an RPC interface in Java/Apps-Framework?  I couldn't figure it out with some time in code search

I'm seeing people using easymock and mockito to do this, but that feels wrong (RPCs don't return null!) and also means that these testing frameworks might find their way into production code if we're not careful.

Here's an example:

 import com.google.ccc.groups.index.server.api.proto2api.CommonGroupsApi.CommonGroupsIndexSyncService;
 ...
 @Mock
 CommonGroupsIndexSyncService.ClientInterface mockSyncServer;
...
    bind(CommonGroupsIndexSyncService.ClientInterface.class)
        .toInstance(mockSyncServer);

Perhaps we could have a stub implementation that could do the following:

1) Implement returning defaultValue for all requests.
2) Implement returning RpcException for all requests.

Extra credit for the following wrapper class that would allow for injecting behavior into the pre-rpc/post-rpc phases:

  public class ForwardingRpcClientInterface {
     ...
     pubilc T delegate() {}

    beforeRpc(...);
    afterRpc(...);

    public Object invoke(...) throws Throwable {
      // defaults to forwarding to delegate
    }
  }

With something like this you could implement a client-side cache or short-circuit requests here.  You could also implement the defaultValue/RpcException classes based on this.









 

Some perspective from last year's I/O.


http://www.youtube.com/watch?v=mXSjF6iNFeg






 

Since we're talking about degenerate +1 buttons in the wild -- here's one that's pretty bad.  It appears that someone took a plusone button iframe element from the dom of one page and slapped it into this.

@109016304695129264328 -- do you have any inside connections?


http://www.laroux.co.uk/






 

It's been a long time since I had to switch back to chrome stable from chrome canary.  Today is one of those days...









 

A favorite open ended topic I use for interviews.

_Your Coffee Shop doesn't use 2-Phase Commit_

[and a sad snippet for pdf link shares..]


http://www.eaipatterns.com/docs/IEEE_Software_Design_2PC.pdf






 

It's 2013 -- why do we still have problems with hotspots in Bigtable/Kansas?

I have not looked into the backend design, but this seems like something that's been solved in the past.

Do we not have
- Dynamic-sized replicas (add more read-only replicas for hot keys)?
- What about adaptive sharding/rebalancing (rehash based on usage)?
- Hierarchical storage? (automatically move dormant accounts to older/slower hardware, move back when reactivated)
- Or... the ability to manually move a single hot key to it's own instance. (variant of adaptive sharding above)

I know about the stubby cacher and how that can help, but that seems like treating the sympton rather than the source of pain.









 

2m curated profiles and associated data.

Somewhat bizarre.


https://www.relsci.com/






 

http://www.thefanmarket.com/

per 1000

twitter followers
0 Instagram likes
3 Soundcloud plays
5 for FB Likes
5 for FB Likes (USA)
0 for YT Followers
0 for +1s
0 for YT Likes

We're premium...  Congrats S&A team  @115520453074644055116


http://www.thefanmarket.com/






 

Wife just told me that Scroogled is now using promoted tweets.

Doesn't seem worth the 00k/day...









 

Good idea?  Bad idea?  I'd probably want some heuristics (like don't show http://www.cnn.com/ on http://evil.com/)

Maybe even just limit it to stripping off query params?

Chrome folks?


http://www.distilled.net/blog/seo/combining-the-html5-history-api-and-the-canonical-tag-for-improved...






 

Ported my code to run on corp.  Luckily twitter has undocumented ssl support for their URL count.

https://www.corp.google.com/~plindner/thecount/

I'll be hacking this on/off.  You can see the crufty jquery stuff in /home/plindner/www/thecount









 

Of interest to moments API work / Aspen and Google+ History

Has the concepts of Actor/Verb/Target

@117410472150303805486 @114489135332974198500 @104392738264586850178 @110885671099056346036


http://tincanapi.com/developers/tech-overview/






 

Should we tell the world that you can get +1 counts like this?

https://www.googleapis.com/pos/v1/plusones/http%3A%2F%2Fwww.google.com%2F?callback=jsonpCallback

Instead of the gross reverse engineered hacks that are out there that post to clients6.google.com?


https://www.googleapis.com/pos/v1/plusones/http%3A%2F%2Fwww.google.com%2F'






 

 that utm == urchin tracking module









 

Just saw this guava witchcraft snippet in a code review today from @112047346673343275962.

In this case we wanted to sort by a primary, secondary and tertiary key.  However we only want to keep the first 'primary' entry found.

The magic is that ImmutableSortedSet throws away duplicates, and you can define duplication with the orderedBy() method (which should almost be renamed to .orderedByAndEquals())

sorted = primaryOrdering.compound(secondary)
    .compound(tertiary)
    .immutableSortedCopy(full);

return ImmutableSortedSet
  .orderedBy(primary)
  .addAll(sorted).build();









 

Should we make a crowdsourced hashtag <--> freebase mid site?

Here's a stillborn site that would have been my first choice for a name...


http://www.hashtagpedia.org/






 

Cloud based Music Queue sounds like an interesting idea.   Maybe you could 'fling' your queue to any screen....


https://plus.google.com/u/0/107928193007461262370/posts/Ums1ou7RzU6?e=-RedirectToSandbox






 

Can someone help me decipher where this page is being generated?  I want to change it to pass in the rel="me" param to the ancient focus widget.

If possible I'd also like to see it use the G+ profile badge instead which is much much nicer.

http://books.google.com/books?uid=108407510003645795115


http://books.google.com/books?uid=108407510003645795115






 

In honor of C-Sprint - *Convoy* and *CB* radio.  And Rocketsled on rails, I don't care if it doesn't start with C.


http://www.youtube.com/watch?v=XlXx6LxMbdQ






 

*IDEA* Stubby no-op detector.

Stubby clientside code that tracks if the response code is always the same.  Found some RPCs today that were no-ops due to validation in another part of the system..  Would be nice if we could detect this and report it back.









 

Ads folks, good? bad? otherwise?

I want to align the widgets we support with common dimensions used in web layout.  What better place to start than the ad-units most sites use.

My goal here is to make widgets fit seamlessly into layouts and make widgets usable for ad campaigns - for example:
- Brand Follower Widget as an mrec.
- Community Widget latest posts with subscribe.
- etc.


http://www.iab.net/guidelines/508676/508767/displayguidelines






 

If I could clone myself I'd spend all my time doubling-down on making Google *the* place for musicians and bands.  Between Play, Youtube, Search and Plus we have so much to offer, yet don't wrap it up in a pretty package like we should...


http://techcrunch.com/2013/02/02/myspace-squandered-the-only-thing-it-had-left/






 

Why are we serving up the refresh images? Are the cache headers set properly?  I've been noticing this too on desktop and mobile.

Photos team -- any idea what's going on here?  @102367365652197389609?


https://plus.google.com/u/0/105307547102248990120/posts/Rh1G5g9npTd?cfem=1&e=-RedirectToSandbox






 

Have ideas on how to improve Google+ widgets?  Add your ideas and up/down vote existing ideas here:

https://lightning.corp.google.com/plus-button

This uses Lightning which is a frontend to buganizer for ideas collection and management.  It's funny how a simplified interface can make such a difference.

Try it out!


https://plus.google.com/photos/107786897865850743842/albums/5839292500124762193/5839292505628736098?...






 

DiRT idea -- push out a bad Android build to Googler Android phones that bricks 'em.  (ahem temporarily)









 

Today's a day when I wish I could type 20 ctrl-g in chat windows...

Guessing that's by design...









 

Is it time to stop domain-sharding for browsers using SPDY?

I notice that we're doing the right thing for images in the Google+ stream:

https://cs.corp.google.com/#google3/java/com/google/apps/people/activity/client/wrapper/ActivityConv...

Guessing there's lots of other places where this pattern is used..









 

How did I miss this?  @110388429398517693608 -- how well is this supported?

Man I hope that we only need a style="display:block" tucked in there for converting links to widgets.


http://html5doctor.com/block-level-links-in-html-5/






 

I'm a bit worried that some Googlers are getting a little obsessive with this game.  Not to name names but there are some people that have portals all throughout the googleplex in Mountain View and will take back anything that gets blown up in the matter of minutes.

I suppose it doesn't matter much now that the Resistance has taken over almost everything.  I'm not going to bother and channel my obsessive-compulsiveness into my job instead...









 

Everyone.  Please add sensible canonicals.
- Especially if you have a 'enable SSL' bit.
- or if you have content that spans multiple domains
- or if you respond to /foo and /foo/ without a 301 redirect on one of them.

I've noticed two canonicalization issues (project hosting and sites) in the past few days.  I'm guessing there are many more out there..


http://support.google.com/webmasters/bin/answer.py?hl=en&answer=139394&ctx=plusone






 

Anyone looked into this?  Happy to see alternates, but I am somewhat concerned about this quote:

_...there seemed to be little interest from Google in changing and extending GPB to address the performance related issues._


http://blog.blinkprotocol.org/2013/01/blink-compared-to-google-protocol.html






 

[ note -- this a test of how social actions increase the score you see on third party websites.  To see it in action:

1) Go to techcrunch and note the counter value.
2) Comment/+1 here
3) Reload the page after a few seconds to see the number go up.

wheeeeee!


http://techcrunch.com/2011/08/08/whats-the-fastest-web-browser-in-the-real-world-chrome/






 

This is pretty nifty.  Just need to wrap this in a chrome extension...


https://gist.github.com/2640302






 

Begone vile techcrunch transparent image seen in too many shares..

See http://b/5827537 for more detail and to lament that this fix took a whole year..


https://plus.google.com/photos/107786897865850743842/albums/5833776330904352769/5833776339214430850






 

Am I the only one watching the FB live stream and the OKR live stream?









 

*Suggest* -- _it's not just for search queries_

Is there a "Google Cookbook" resource for our customers on how best to use our plethora of services given a scenario?

The specific example I have is "opening a new restaurant".  Here's some of the steps I can see that we might want to suggest.

* -Sign up for a MapMaker account, add your Restaurant.-
  http://mapmaker.google.com/
  Oops, found out you can add your listing here instead:
  http://www.google.com/places/
* _.....wait for review of your edits...._ * Do not create a Google+ profile (yet) despite what you read at:
  http://www.google.com/+/business/
* Consider Apps For Your Domain    http://deployment.googleapps.com/Home/small-business
* Create a website for your business using Google Sites
  (Or maybe Google Drive?  Or just host it)
* Sign up for Webmaster Tools.
  https://www.google.com/webmaster/tools/
  - Verify website ownership via DNS or 'magic' file.
  - Set your geographic target.
  - Set up sitelinks for directions/menus
  - more?

* Sign up for AdWords.  Set your timezone forever and ever:
   https://www.google.com/adwords
* Sign up for Google Analytics
   https://www.google.com/analytics
* Sign up for Blogger, and create a blog.
   https://blogger.com/
* Add the following to your website
  - Google Analytics
  - plusone/share buttons
    https://developers.google.com/+/plugins/

* Phew, -MapMaker- Google Local listing approved weeks later!
* Go to the Google+ Places page, and submit request for verification.
* _.....wait for postcard to arrive in the mail....._
* Start posting to twitter/facebook/tumblr/yelp in frustration.
* Get Zagat rated:
   http://www.zagat.com/restaurant-owners
   email to presskits@zagat.com
   [??? Is this obsolete information?]

* Hooray!  My business verification postcard has arrived.
* Verify my business!  Create my plus page linked to my Places page.
* [delete any plus pages you may have created before this point. so sorry!]
* Connect Plus page to my website
  http://support.google.com/plus/bin/answer.py?hl=en&answer=1713826
  - add magic <link.. tag> or a brand badge widget to verify.
* Add my Opentable link.
* Get interior street view for my business
   http://maps.google.com/help/maps/businessphotos/
* Add Blog/Social Networking links to my Plus page for authorship.
* Upload photos to my Plus Page.
* Get Followers for my Page and have them write reviews.
* Sign up for Google Offers
  https://www.google.com/offers/business/
* Start an Adwords campaign.
* Post regularly to the PlusPage by setting a reminder email.

After poking around gathering these links it really makes you realize that our Org Chart is on display and how painful this is for users that just want to get things done.  I also realize that we've made great progress in unifying many services.

That said, there's lots that could be done.  Can we suggest the next step to a user?  Can we remove the speed bumps between products.  Can we infer customer intent? ("It looks like you're opening a restaurant, you might want to do A, B, C next.)









 

IDF needed: *Method of generating culturally non-offensive hash numbers.*

Requesting "Satan's number" removal from my profile!!
Jacob Ryan Hughes Jan 10 08:49PM -0800

I am requesting an *immediate* URL number sequence change!! The pattern in
my profile's number sequence has the following 3 in a row 6s, symbolizing
"Satan's number" in the Bible. It wasn't until today (01/10/2013) that I
realized that the number sequence had the following "symbol". I will even
pay for a shorter URL for the inconvenience! Please help me resolve this
issue!!

Here is my profile
https://plus.google.com/109134666819281103796/about









 

Meeting room occupied beyond the end time?  Try this:

1) Find the hangout for the meeting that's running over.
2) Join the hangout.
3) Add Youtube app.
4) Play annoying videos


http://www.youtube.com/watch?v=U3jgo5ea_zc






 

 

Anyone have a copy of this lying around?  If not I'll expense a copy (or two).

A good chunk of it is in Google Books, but would like to read the rest of it.


http://books.google.com/books?id=2chSmLzClXgC&printsec=frontcover&source=gbs_ge_summary_r&am...






 

Anyone opposed to making a postmortem community on public G+?  Obviously it would only have public information.  The Github writeup was interesting and there are plenty of other writeups that one could chat about.









 

A little something shared with me by my former colleagues at LinkedIn.


http://www.youtube.com/watch?v=Ba6Igu1MvE0






 

The secret truth -- the ITU wants deep packet inspection to fix their Content-Type charset headers..


https://plus.google.com/photos/107786897865850743842/albums/5823819709617866049/5823819712652075282






 

 

*Hidden Riches!*

From java-libraries-dev

ImmutableMultimap has an inverse()  method, so it's really also ImmutbaleBiMultimap.


http://docs.guava-libraries.googlecode.com/git/javadoc/com/google/common/collect/ImmutableMultimap.h...






 

Count -all- more of the +1s !!!

And we can even beat twitter when the article isn't being reposted by tons of bots, like this:

http://theoatmeal.com/comics/state_web_winter_2012


https://plus.google.com/photos/107786897865850743842/albums/5823404156012784257/5823404159481790626