Macklemore - Vipassana

Yesterday, forget it
Tomorrow is, nada
The present is, right here, through the breath, watch it
Atheist Jesus piece, hangin' on a cross
We sit and discuss God on lawn chairs
About how we got here,
What it is, what it isn't, shit
Fate versus faith, scrimmagin' with coincidence
Leave out the market and hold up on the business end
Focus on the genuine, with everything else, you can shed the skin

10. May Life Permanent link

Twitter, Disqus comments and over 1 million uniques!

Some smaller updates:
  • I have introduced Disqus comments to this blog, hope you guys will use it
  • I have re-created a Twitter account. You should follow me here

It's not something I follow that closely, but my blog has been read by more than 1 million unique people since its introduction! I plan to spend some more time blogging here in the upcoming time and I hope you stay tuned! Thanks for the support!

Over 1 million people on amix.dk

Messaging at Scale at Instagram

As activity accelerated from just a few thousand activities per day to hundreds of millions, Instagram needed a reliable, scalable messaging infrastructure to distribute work and messages.

Has a lot of great insights and scaling strategies you might use. Recommended watching:

Simplicity Matters by Rich Hickey

Great and insightful talk by the Clojure creator:

Good enough is good enough!

Our culture's default assumption is that everybody should always be striving for perfection -- settling for anything less is seen as a regrettable compromise. This is wrong in most software development situations: focus instead on keeping the software simple, just "good enough", launch it early, and iteratively improve, enhance, and re-factor it. This is how software success is achieved!

An amazing talk by Alex Martelli, the "Über Tech Lead" for Google. It is from this year's PyCon 2013, it has nothing to do with Python tho'!

22. Mar Code · Code improvement · Design · Python Permanent link

How to become more productive by using 2 computers

I have a simple and neat productivity tip I want to share.

One of the things I noticed I do a lot (especially when presented with hard problems) is to procrastinate by opening my email, opening Hacker News or something similar. I think it's a fairly common thing for most people. The problem with this is that it's very unproductive: because the mind gets distracted, looses focus and needs to do constant context switching.

It's also ruins Flow, a state you want to be in:

Flow is the mental state of operation in which a person performing an activity is fully immersed in a feeling of energized focus, full involvement, and enjoyment in the process of the activity. In essence, flow is characterized by complete absorption in what one does.

There's a lot of scientific research on the matter that concludes that multi-tasking and constant context switching is really bad for your productivity.

“Multitasking is going to slow you down, increasing the chances of mistakes,” said David E. Meyer, a cognitive scientist and director of the Brain, Cognition and Action Laboratory at the University of Michigan. “Disruptions and interruptions are a bad deal from the standpoint of our ability to process information.”

Back to the tip! It's really simple:

  • I have a work computer where I do work and productive things. Unproductive things are blocked on this computer.
  • I have another computer (an iPad) where I do unproductive work, such as check Hacker News, Facebook etc.
  • I process emails 3 times a day (after I am done with the emails, I block Gmail).

I have found out that this improves my productivity greatly. You should try it out :-)

Home office

I also recently setup a pretty awesome home office (I don't work here all the days of the week, but the days I work here it's amazing):

Home office

7. Mar Productivity · Todoist Permanent link

PyCon Russia - Redis, the hacker's database

I recently visited my first PyCon and held a talk about Redis, scaling and some libraries such as bitmapist!

The slide and video are already up:
Redis The Hacker's Database - Scribd.com

Mastery

Mastery - Michelangelo quote
26. Dec 2012 Posters · Stuff Permanent link

Releasing bitmapist.cohort - or how we saved over $2000/month!

Redis logo

I released bitmapist a while ago and I am happy to release an extension that makes the library much more powerful!

Installation and source code

sudo pip install -U bitmapist

Fork the code at Github.

The reason why I implemented this

I want to tell you why I coded this (and how we saved over $2000/month by having this library). I looked at Mixpanel's retention feature - which seems amazing. The problem for us is that we would need to track over 20million events pr. month and Mixpanel is crazy expensive (it would cost us over $2000/month to get this feature!)

So I did what any sensible person would do: I coded my own version and open-sourced it so others can contribute. There's for example already a PHP port of bitmapist!

What can it help me with?

This library makes it possible to implement real-time, highly scalable analytics that can answer following questions:

  • Generate a cohort table over real-time data stored in bitmapist
  • How many % of users that were active last [days, weeks, months] are still active?
  • How many % of users that performed action X also performed action Y (and this over time)
  • And a lot of other things

If you want to read more about cohort please read following:

Screenshot of bitmapist.cohort

With bitmapist.cohort you can get a form and a table rendering of the data you keep in bitmapist. If this sounds confusing look at Mixpanel. Here's a screenshot:

bitmapist.cohort screenshot

Getting started

Mark user 123 as active and mark some other events:

from bitmapist import mark_event
from bitmapist import cohort as bitmapist_cohort

mark_event('active', 123)
mark_event('song:add', 123)
mark_event('song:play', 123)

Generate the form that makes it easy to query the bitmapist database:

html_form = bitmapist_cohort.render_html_form(
    action_url='/_Cohort',
    selections1=[ ('Are Active', 'active'), ],
    selections2=[ ('Played song', 'song:play'), ],
    time_group='days',
    select1='active',
    select2='song:play'
)

# action_url is the action URL of the FORM element
# selections1, selections2 specifies the events that the user can select in the form
# time_group can be `days`, `weeks` or `months`
# select1, select2 specifies the current selected events in the FORM

Get the data and render it via HTML:

dates_data = bitmapist_cohort.get_dates_data(select1='active',
                                             select2='song:play',
                                             time_group='days',
                                             system='default')

html_data = bitmapist_cohort.render_html_data(dates_data,
                                              time_group='days')

# All the arguments should come from the FORM element (html_form)
# but to make things more clear I have filled them in directly

Plug the above code into your codebase and you are ready to go :-)

Happy hacking!

13. Dec 2012 Announcements · Code · Database Permanent link

We are hiring talented iOS developers

We are expanding the team at Doist with iOS programmers.

Some of our stats:

  • Over 400.000 users (and growing fast)
  • We already have a kick-ass iPhone app
  • Our business is profitable
  • You will be working with the best people from around the world

Join us either freelance or full-time and work on something that makes the world more productive.

Send your resume to [email protected], be sure to include some code you are proud of (or a link to your GitHub/BitBucket profile).

28. Nov 2012 Announcements · Code · Todoist · Wedoist Permanent link
© Amir Salihefendic