Thoughts about GMIC SV and GDG DevFest


Like I wrote yesterday, GMIC SV sucked. Supposedly, it had different sessions for entrepreneurs & executives, start-ups and developers. I think that the main purpose was to help US and Chinese companies to do some networking – and maybe it was successful from that perspective, but as a developer who made the effort to participate (on a Friday!) in code-labs and learn about new technologies – it pretty much sucked…

The WiFi connection was horrible, which effected the speakers presentations as well as the attendees. They had separate rooms with light refreshment and coffee (for developers and executives), only that the developers’ room ran out of coffee during the first hour and it was left this way at least until noon (I didn’t bother to check later). Also, the A/C was working so hard in one of the labs – that I’m pretty sure that at some point I noticed a polar bear running to the bathroom…

I went to three sessions and one keynote and only the first session was interesting (to me). During lunch break, we went out and strolled the streets of downtown San Jose looking for something to eat (since food was supplied only for Executives and VIPs). We had less than an hour – if we wanted to make it to the next session.

It kind of felt that this convention wasn’t REALLY for developers and we were treated like we belonged to the lowest caste…

Around 15:30 we decided we’ve had enough of it, and of course we didn’t bother to go for the second day. Luckly for us, we found out about GDG San Francisco DevFest (which took place in Google’s offices in Mountain view) and bought tickets on time. This one was a totally different story. You can see the agenda for yourself.

We started with Google wallet session by Mihai Ionescu which was very interesting especially since I’ve been in the E-commerse business for more than five years now.
My conclusion from that session is that Google, like PayPal wallet, supplies very limited payment processing services:

  • supports only credit-cards
  • supports only 9 currencies
  • supports only single items (can’t create a cart and checkout with multiple products)
  • supports only monthly subscriptions (recurring charges)
  • does not support configurable soft-descriptor (that’s what the customer sees in his bank statements)
  • does not support currency-conversion – it’s the vendor’s responsibility to calculate the conversion: Google will charge the amount that is passed in the request in the same currency that you state – you cannot provide one price in USD and expect Google to calculate the conversion for you
  • you (the vendor) need to open a merchant account
  • in case of a refund/chargeback – no “hedging” is done – so if the customer was charged in Euro and after three months the dollar dropped and the customer asked for a refund – the vendor will pay back the amount in US Dollars converted from the current rate of Euro – which might result in loss of money

But of course, there are “Pros” too, after all it’s Google:

  • commission rates are WAY lower than PayPal’s: 5% or 1.9% + 30 cents per transaction (the lower between the two!)
  • no refund/chargeback fees!
  • it used to force the user to open a Google wallet account (like PayPal’s) and now you can pay as a “guest”
  • will support quarterly subscriptions (probably by the end of Q1 2013)
  • simple integration using Javascript, json (JWT – json web token) and server-side

The second session was: Start ups by Rob Walling and I have only one word to say:

After lunch, which was really nice, we joined a session on YouTube by Jeremy Walker, which described YouTube API capabilities that will be available in v3 once it’s out (should be in less than a month).

And the last talk for the day (for me) was about Google+ by Jonathan Beri which discussed the new API – personally it was less relevant for me – but yet it was interesting.

I’ll wrap up this time with the geekiest joke of the week by Song from GMIC SV – HTML5 code-lab:
man: make me a sandwich
wife: NO!
man: sudo make me a sandwich
wife: okay

Thoughts about GMIC SV and GDG DevFest

Linux & vim shortcuts – let’s have some fun

I feel stupid for using VI text editor, why didn’t I think of trying VIM in the first place ?

Yesterday I went to GMIC SV which pretty much sucked but this is a totally different story and I’ll write about it tomorrow.
The only good thing that came out of this conference was an HTML5 Code Lab (speaker was Song Zheng) which demonstrated a few neat tricks about using video for chat/conference using HTML5.

Now, the “not so cool thing” was that half of the session was using webkit flags that are currently supported only by chrome and only if you enable a specific flag by browsing flags.

So after I got my share of joy using VIM I started looking what else I have missed.
That wasn’t difficult to find, a simple google search brought me to this excellent tutorial which I highly recommend!

This reminded me that a few years ago, when I was working for another company, a cool (and unknown) IT dude wrote a bash script that allows you to browse your history commands and choose the one you like and re-run it. All of it was done by one simple shortcut and the arrow keys (for “forward” and “backward”).

The first day I started working for Bluesnap, I banged my head against the wall for not copying this script, I was so used to it…
Since I had no choice I started using:

history | grep "part of the command I was looking for"

but it seemed too much hassle and I kept looking for a better option. Back then we had no IT and it was before the days of stackoverflow, so I searched a bit and found that, in shell mode, when you type


it lets you type a string and it’ll find matching results from your commands History.
Since only one command can be displayed at a time, it’ll display only the most recent command that matches the string you typed. If you want to “browse” previous commands just keep hitting


– nice and simple!

But there are other tricks to using history as well, say the last time you ran mysql you entered

mysql -u root -p

and now you want to run the same command again. All you have to do is type:


and it’ll run the last command that you ran which started with “mysql”. Cute.

But I feel that I kind of ran forward and missed “small things” which I treat as obvious, sorry for that, let’s fix it:


will jump the cursor to the beginning of the line while


will “jump” to the end.

Both VI and VIM support Esc+/ which enters “search” mode – this is very convenient when you’re in a long document and you want to “jump” to a specific location without scrolling (ctrl+f and ctrl+b will move the cursor one “page” forward and backwards respectively). If you want to go all the way to the end you can Esc and then shift+G – it’ll bring you to the last line in the file, but even better, if you know the line number you want:

Esc + :[line-number]

will get you there promptly!

Since I got used to type vi – I added the following line to .bashrc:

alias vi='vim'

and suddenly the world became a better place to live in…

Another really useful shortcut is substituting the first occurrence of “param1″ with “param2″ – in the last command:


it’s extremely useful when you use long commands, for example, say you want to copy file1 to a specific destination and then file2 to the same destination:

scp /usr/home/alfasin/file1 /var/www/html/code

Now, instead of using the “up arrow” and edit the command by moving the cursor like this:

scp /usr/home/alfasin/file2 /var/www/html/

You can simply do:


Can you guess what the following alias does?

alias fuck='sudo $(history -p \!\!)'

I can’t take credit for it and it’s too bad cause that’s one of my favorites: when you type a command in shell and you get the “insufficient permission” screw-you response – all you have to do is simply type “fuck” and Enter. Yes. That’ll run the previous command preceeding by “sudo”…

If you’re a shortcut-junkie like me, better RTFM.
And if you’re just looking for a few more tools for ‘ya belt, this is a cool read. In case you want to improve your shell skills, a beautiful website called memrise offers a nice course called: Shell-Fu. Enjoy!

Linux & vim shortcuts – let’s have some fun

Silicon Valley CodeCamp

I know it’s totally geeky, but I’m excited about the CodeCamp this weekend as if I was a kid that his parents are taking him to six-flags…
There are so many interesting sessions, all the timeslots have at least 3-4 talks I’d like to hear…

On a totally different note, there’s a new video-clip that drives everyone crazy calledGANGNAM STYLE and naturally, many people created their own version. LOVED it!
Have a great weekend guys, I know I will ;)

Silicon Valley CodeCamp

What’s the most important thing a small start-up should do?

A small company called Laminar Research, a creator of a flight simulator got sued by an even smaller company called Uniloc for IP infringement. Now, the company I work for, used to work with Uniloc for a couple of years, integrating their license-management solution into our product. Around December 2010 they stopped supporting their product and I believed (until recently) that they were shut down.
Well what do you know? it seems that since they stopped developing and selling their product – they started making the big bucks – sounds weird ? not at all!
Apparently these guys, which are located in Luxembourg, finally found a good way of making money without any hard work: by suing!

The “IP” that Uniloc claims that x-plane (and previously Microsoft) infringed can be described as follows:
“A registration authority communicates with the electronic device. The registration authority has a database of verification data for verifying the license data stored on the licensing medium and provides updated license data to the licensing medium.”

Basically what it says: the patent is of a “LIVE” authentication of a license-key with a license-management server (over the web).

Sounds unbelievable?

After hearing the BS that Apple used against Samsung (for copying features like “pinch and zoom” and the “bounceback” effect), it doesn’t sound that weird anymore. So I’m probably naive, but I still can’t believe that anyone would approve a patent for authenticating against a server.

If you want to read more about Uniloc vs. Laminar Research, you can find the details of the lawsuit here.

Now for the important part: if you have a small start-up, how can you avoid such bogus lawsuits? cause, you know, the minute you’ll start growing – the blood-suckers will come after you…

Luckily, the makers of stackexchange just launched a new beta: So before you start developing ANYTHING, better search, maybe even post a question!

What’s the most important thing a small start-up should do?

Guava is much more than a delicious fruit!


Yesterday I went to a meet-up organized by Silicon Valley Java User Group, the subject was An Overview of Guava: Google Core Libraries for Java. Naturally, it was hosted at Google. Since I was already late, Murphy decided it would be a good idea to f*ck with me: traffic on 101 was crawling at ~20mph (I’m sure that those of you from the valley will totally understand…).

Anyways, I was only 20 minutes late, when I found out there was still plenty of pizza and drinks, apparently I wasn’t the only one who was late. I still had bout half an hour for mingling, but developers are not great at socializing, so I found myself cursing for not bringing with me my Nexus 7″.

Finally the place filled up, it looked like this:

An Overview of Guava @Google headquarters

Picture credit: Lawrence

A few words about Guava:
Guava is a collection of Google Java-based libraries which includes: caching, hashing, concurrency, collections, I/O and more. The main reason I wanted to attend this event was hearing about their caching solution, unfortunately, right at the beginning of the lectureKurt Alfred Kluever said that caching deserves a separate talk. The good news are that the organizer of the meet-up sent a link to this video right after the talk (the first twenty seconds are in French so don’t get stressed ;)

I asked a couple of questions, one about their caching-library – if it was properly benchmarked and compared to other alternatives (memcache for instance) and the answer I got was that many people decide to implement their own benchmarking and do it poorly, so Guava team assigned one of their team-members to work on a micro-benchmarking library!

A couple of other cool stuff they implemented are the MultiMap (a Map which can hold multiple values for one key) and the BiMap (Map which supports mapping the values back to keys). You can download the slides from the talk here. Also, you can find here some code-examples.

To sum up:

  • Guava looks like something I will definitely check
  • Google looks like amusement-park for developers!
Guava is much more than a delicious fruit!

Today’s a good day to start!

I’m still not sure what I’m going to do with this space, probably share my thoughts about programming stuff, maybe add some cool code examples such as the following code to quick-sort in Erland:

qsort([]) -> [];
qsort([Pivot|Rest]) ->
qsort([Front || Front <- Rest, Front < Pivot])
++ [Pivot] ++
qsort([Back || Back <- Rest, Back >= Pivot]).

Now, here’s a small example of how NOT to write code, the example is in PHP:

public function pdf_read_root(){
   $this->root = $this->pdf_resolve_object( $this->c, $this->pdf_find_root());

This line of code is wrong. very wrong. Let’s see why:

    • Even if we don’t know why, the fact that $this-> appears 4 times in the same line should raise a red-flag!
    • Since pdf_resolve_object() is a class method, it has direct access to all the members so we shouldn’t pass class-members in the signature: pdf_resolve_object( $this->c, $this->pdf_find_root()).
  • From the same reason, this method does NOT require a return value, it can update$this->root inside the method and just return.
  • $this->c ? what about a more meaningful name ?
  • And last, why should we wrap this one line that calls to a method with another method that does nothing: pdf_read_root()?

To sum up, we can easily change this line to something much nicer, such as:


Ta-ta till next time.

Today’s a good day to start!