Leaving Google – Starting TrueAccord

After more than six years at Google, I have decided to quit and start my own company.

Those years at Google have been an amazing experience.  I’ve had the privilege to work with some of the smartest people in the galaxy on the universe’s most critical projects, Gmail, Google Accounts and Google Apps just to name a few.

As the years went by and Google grew to more than 40,000 employees, I started to long for working in a small company.

Together with two friends, I co-founded TrueAccord, a company that helps businesses deal with late payments. It creates a personalized recovery strategy while learning about the reason for default. As it turns out, there is a lot of demand for our product and we are on-boarding new customers all the time.

As the CTO of TrueAccord, I am overseeing all the technological aspects of our product: from infrastructure and deployment to data modeling and algorithms. For the curious, our stack is based on Scala, Python and AngularJS.

We are always hiring. If you are interested in hearing more drop me a line (thesamet at gmail.com)

Posted in Uncategorized | 4 Comments

Facebook is Becoming an Address Book

UPDATE (2014): This has been written 6 years ago, at that period when my facebook feed was all about what my friends had been doing on Farmville. Most of this has been pretty much gone by now. My feed is still spammy, but Facebook has proven itself as a great tool for me as an expatriate to keep tabs on what my high-school buddies are up to.


I really liked Facebook. Few months ago, I could still use Facebook to easily follow up what was going on with my real-world friends. I would see my friends’ new friends, new status updates, moods, and additional useful information.

<rant>

Looking now at my Facebook home feed, there’s almost nothing in it that I care about. Instead of getting updates on their real lives, I mostly learn about the stupid virtual stuff they do in Facebook (creating aliens, adopting them, and eventually letting them compete in various sport games with each other.)

Being unable to follow up the news feeds, I end up using Facebook only for initiating contact (private messages) with new and old friends. That is, as a universal address book.

</rant>

It seems that Facebook is very well aware of this issue. The following is just a partial list of the actions that they have been taken recently to reduce the clutter in feeds and profiles on Facebook:

  • Extended Profile: lets you move application that sunk down in your profile to a separate page.
  • Allows to easily hide or ignore notifications of the same kind (installation of the same application)
  • Gauges to control the kind of events you’d like to see less in your news feed.

What do you think? Are the days of clean and succinct Facebook feeds gone for good?

Posted in facebook | 6 Comments

First week at Google

What a week. I’ve arrived to Dublin on last Sunday. A driver waited for me at the airport and dropped me at a temporary apartment Google organized for me. The apartment is relatively large (2 bed rooms) and is very modern. Kinda neat.

On the next morning, I’ve went to Google’s office and started the 2-day Nooglers training, together with a lot of very interesting people. The diversity of the new hires is amazing. There’s nobody there who speaks less than 2 languages and has an interesting story to tell. The training was quite general, but still very interesting.  The atmosphere in Google is very different than what I’ve imagined. It’s the furthest thing possible from the picture you get in your mind when you think of the phrase “corporate environment”.

On Tuesday afternoon I finished training and joined my team, internally called GMail SRE. Our mission is to ensure GMail’s reliability. Believe me, this isn’t an easy task to keep such a beast running and providing acceptable performance. It seems that the team is facing very interesting and unique engineering challenges. The systems designs seem to be very well done, but quite complicated due to the incredible load and capacity it is designed to handle. They say it will take several months until I’ll become useful.

Besides working, I had the chance to get to know Dublin better. Today one of the Nooglers who knew the area took us for an hike in Howth. The view was really spectacular, reminded me of some parts of Norway. The weather here is changing all the time, but luckily it was quite good this weekend.

It seems now that I’ll be in Mountain View, CA,  for 8 weeks of training starting on early October. Everyone is talkin’ how crazy (in a cool way) the Googleplex in Mountain View is. Looking forward to that. That’s all for now.

Posted in google | 8 Comments

15Gammons: Backgammon in TurboGears

I’ve finally launched it. screenshot.jpg

15Gammons is an online realtime backgammon website. Its backend is written entirely in Python using TurboGears and Twisted.

In fact, it is the first TurboGears project I’ve started (over 18 months ago); and the last one I ended… I finally had the time to give it the final touches and open it to the public.

Back in 2005 I learned, together with everyone else, that web browsers are capable of doing much more than they were originally designed to do. Javascript libraries were popping out every few days giving drag and drop and animation effects. Everyone were talking about AJAX. I couldn’t stop myself from starting to code a game using the latest tools at the time.

15Gammons utilizes the so-called Comet technique of streaming events to the browser over a long-lived HTTP connection for achieving low latency. The Comet part is written using Twisted. I am planning to share some useful code in a later post.

The user interface was written using the Script.aculo.us library. Flash is not required, but is optional if you like sound effects.

Check it out – play backgammon online in 15Gammons.com!

Posted in python, turbogears | 7 Comments

Speeding Up your Application with Javascript Templates (and cjson)

The web application project that I am currently working on (the one for which I’ve written TGFusionCharts) has some pages with huge tables, generated using the Kid Template Language. Page loading times became more and more notable as the table sizes went up. On some pages, the rendering time could be as long as 2 seconds.

As I already had methods that return the table data as a list of dictionaries, I thought that I could try sending that data to the browser as JSON, and then process it there using Javascript.

I then came across JST, which is a small Javascript component that renders JSON data with a given template. The template itself can be embedded in the HTML document inside a hidden TEXTAREA element. This seemed like an easy solution. Converting the table part of the Kid template to a JST template was straight forward. Looking at the page loading times now, the speed improvement is remarkable.

After doing that I was able to gain another performance improvement by converting my data to JSON using python-cjson, which is a fast JSON encoder/decoder module implemented in C.

I’ve collected some measurements, which are of course very specific to my application, and should be treated as such.

KID JST
1st Run 10.96s 2.19s
2nd Run 11.14s 2.28s
3rd Run 11.02s 2.28s


Each run consisted of generating the page (i.e. calling an exposed function) ten times. The data structure was preloaded to a global variable before the run, so this time is not included. However, some code that is executed by TurboGears’ expose decoration is included in the measurement.

As you can see, using this technique the page generation times is now about 5 times faster.

Posted in python, turbogears | 10 Comments

Add Eye-Catching Flash Charts to Your TurboGears Application

FusionChart SampleI’ve released today the first version of TGFusionCharts.

TGFusionCharts is a TurboGears widget built around InfoSoft’s FusionCharts, which lets you easily add beautiful animated flash charts to your web application.

The package support a wide varierty of chart types, including pie charts, column charts, and line charts. Some of the charts comes with a 2D and a 3D version.

Of course, every good thing must have some drawbacks. Your visitors must have the Flash plugin installed (98% of US users have it installed, according to a study stated in Wikipedia). Moreover, the FusionChart component has a commercial license, but comes with a free trial. If you are not too bothered by that, take a look at TGFusionCharts.

Posted in python, turbogears | 2 Comments

Catching Up

A lot has been going on lately:

1. I participated in an academic workshop in Vrnjačka Banja, Serbia.

Country roadSelection Principles and Games in Tipology

2. More or less 20 hours after I returned from Serbia to Israel, I flew to Dublin, Ireland for a day of on-site interviews in Google.

3. I got married!

4. Few days before I got married, I’ve received a job offer from Google EU Headquarters in Dublin, Ireland. I’ll be relocating to Dublin in September!

Posted in daily | 5 Comments

Productivity Tip: Multitasking slows you down

The picture says it all. Multitasking really slows you down. Suppose you have two tasks to do: Task A and Task B. When you perform your tasks alternately (as in the top line) you pay a big overhead cost. Each time you are resuming a task, you have to load all the information related to it into your head and to enter into the state of mind that you had been when you last stopped doing it. This overhead is known in computer science as context switch.

When you work on each task until it is done (bottom line), you save yourself the context switch overhead. And therefore you are able to finish earlier. Each of the tasks on the bottom line is completed before the corresponding task on the first row. By the deadline (finish time), you had completed both tasks and even had time to rest (the blue arrow).

I prefer to manage my work as in the second row. When I work on a software project, I always get into my working room knowing that I am on the task until it is done. After several minutes, my mind enters the world of the project I am doing. I can’t hear or see anything not related to it. I totally live it.

And before I notice, the task is done.

So why do people multitask?

Sometimes there is a need to show progress in two tasks. In that case, you can’t avoid switching between them. Sometimes you just can’t progress on a task until you get additional inputs on it and then it makes sense to switch to the other one.

Some people choose to multitask whenever one of the tasks becomes boring or they just don’t want to do it. It is like doing it in very small steps, where each step is bearable. But then, they spend on each and every step the overhead of switching to the task that they don’t enjoy doing. Quite weird, since with this strategy they end up spending more time on the things they don’t like. The solution is obvious. Allocate enough time and finish with the things you don’t enjoy doing at once!

Posted in daily | 10 Comments

Winners of the Python Challenge

The Python Challenge had started two years ago, in April 2005. The basic idea of the Python Challenge was to introduce people to the wonderful world of Python by creating a puzzle which will encourage them to solve programmatic problems with a bit of Python code. It got amazingly popular and some people had admitted they are strongly addicted to it.

The vast popularity of the Python Challenge had pushed the creative juices in my head and a new puzzle with actual rewards is being “cooked” while you are reading this post.

This is the right moment to announce who were the great winners of the Python Challenge. The following ten were the first to successfully complete all the 33 levels of the puzzle. The list is sorted by completion time from the first to the last. Next to the names you will find the first thought which occurred in their minds at the finishing line.

Each of the winners get the prize of being mentioned in this list (I can link to your site if you wish). :)

But before we’d go on with the list of winners, I’d like to thank to all those who participated in the Python Challenge and those who suggested levels. I’d like to thank my girlfriend Avital who gave me the inspiration. Special thanks go to Tim Peters and Martijn Pieters who helped moderating the forums.

  1. bit4: I finally had time to code and run the etch-a-s[ck]etch solver and get past the smiling python. Lovely!
  2. wo: Good Game!!I’m learning python since 2005-05-05.
  3. University_of_Ulm_ms55_gh5: We needed 3 hours to fully reveal that smiling python image by hand… (and 4 fields had been wrong).But of course it was fun – even as there was the possibility that the next image would be of size 100×100 *g*.
  4. cosimo: Three weeks of challenge. Really great time for me! (excluding one or two levels :)
  5. gbrandl: Was fun, again! Loved especially 32…
  6. DJohn The <spoiler removed> one required too much external knowledge. But the rest have been fun.
  7. mfuzzey: Great fun – very addictive.
  8. Hemlock: Loved it!
  9. acw1668: I really enjoy the journey and I hope there are more levels soon.
  10. Fraxas: Thanks so much for doing this puzzle for us all, thesamet. it’s been great fun.Pharaohmagnetic: I’ve been working on this challenge with Fraxas for the past several weeks. In that time, it has intrigued, frustrated, and thrilled us to no end. We finally made it to his page. Congratulations on making an awesome puzzle.

Here are few more quotes from people who completed the challenge later:

  • ajohnson: Wow, that was great. I’m sure my work suffered while I devoted much time to this. I do feel I needed more help than I should have, but it was still much fun!
  • confused: Thanks for some really great challenges, it has been a lot of fun.
  • sdsmith: At the end at last! It’s been a fun couple of days… ahem… weeks… ahem… well, anyway, thanks for all the superb problems!
  • Pinzo: Hey! I’ve done it!!! I’ve done it!!!Continue the great job!
  • jazzgeorge: This was a lot of fun. I didn’t know python at all when I started, and this was a great way to learn!
  • divergentdave: These puzzles were a great way for me to learn more about Python, such as stuff like string[::-1].
  • Franio: more levels please!!!
  • Xofon: Guess I have not been first, but this was not why I struggled through all of this. A pleasant way to learn Python.
  • Asi.tak: Thank you for this wonderfull game. I really liked it. I’ve never done anything in Python before and I feel that this Challenge was the best way to learn it and start to like it. It was a lot of fun. So thanks a lot. I am looking forward to new levels. :-)
  • nageroc: Can it really be the end? Thanks for the challenge!
  • nmcserra: This was great fun! Thanks for creating this challenge.
  • arnache: Great site.
  • Could never have done more than half of them without the hints forum: some of them are just to hard without indication (don’t pretend the hints you give are helpful), and easy once we have it. But that’s the nature of riddles isn’t it ?

  • interesse: Solved the first level on July 30th 2006. Now we have December 11th. What a time burner…
  • grzes: that was fun. took me a long time though. when i started a little less then a year ago all i knew about python was the wikipedia entry on it… this challenge served me as a python tutorial of sorts…
  • tomk: Yes!!!! Finally made it, thanks for a really great way to waste loads of time 😉
  • newfweiler: I made it! Wow! Thanks for a fun way to learn Python. I’m going to go send you a second Paypal donation just because this was worth more than buying another Python book.

And finally, here are some quotes from quick fellows who have completed the challenge before it had 33 levels:

  • jtauber: This challenge is fantastic. Clever, addictive and really gets your mind working. I feel like I’m playing Myst.
  • japyh: Please, stop, no more. I beg you. :)
  • Hang: What was fun! Very good brain exercises.It ‘forced’ me to discover something new python stuff, and make some new friends too.
  • birkenfeld: Yay! Has been fun till here, hope there’ll be 100 soon! <wink>

To be continued.

Posted in python | 6 Comments

WordPress MySQL Database Encoding Fun

I’ve finished moving thesamet.com to a new web host. The most tedious thing to do was to move the WordPress SQL database to the new server.

It turns out that the database was created with latin1 character set while WordPress pushed utf8 encoded data to it. For those who got stuck in the same problem, here is what I did to transfer the data to a new server.
Continue reading

Posted in daily | 3 Comments