Manage or code: pick your own adventure

I was presented with this question the other day: can you NOT code? The answer is: I can’t. I’m not the best developer out there, and my current role does not really require coding. But I really love and enjoy it, and whenever I get a chance, I like to get my hands dirty on some quick-win or hobby projects (that’s why I like Javascript and Python that let me get the job done quickly with minimal dependency overhead)

The next question that comes to mind then: do you prefer being a developer or a manager? This is a very interesting one, and I think I could go either way. Being a developer is fun. Developers’ lives allow for a delicate balance of logic and creativity. And because the nature of development is so focused, they can truly become masters, experts of their domains. Developers are like alchemists with some special secret knowledge, who can turn clay into gold with their magic touch. And of course, that earns them lots of respect (and monetary rewards too).

A great technical manager is ideally a former developer, so he/she understands how other fellow developers think and work. This manager knows how to make developers happy and get great results: give them uninterrupted environment, challenging and well-defined tasks, reasonable schedules and timely and clear feedback. Managers interact with other roles in the company, so they get the visibility to everything related to a project, from different people and angles. A manager’s world is not binary: there are complex human interactions, lots of details to weigh and decisions to make. Great managers are like orchestra conductors: they know how to get everyone play their instrument in harmony with others and produce a beautiful tune.

So if both sets of skills are so valuable, can one person be a programmer and a manager at the same time? The answer to this: probably not. You could have a technical manager who spends a small percentage of time on quick one-off coding tasks. Or, you could have a great developer who plays more of a lead role, but stays very close to the code. If you start demanding of someone to be a great developer AND manage the whole process, it is bound to fail at some point. These roles demand different dynamics: development requires a lot of focus, while managers constantly interact with various people and thus get interrupted quite a lot.

So I think these scenarios work well:

– You’re a technical manager who no longer codes or who codes occasionally and on a small scale
– You’re a developer who takes a lead role within the tech team, but not heavily involved in larger project management

Should a CTO code? Be able to – absolutely. Do it as a daily routine task – no. Hire 2 people – a great manager/leader and an awesome developer, and you will win in the long term.

Don’t judge a startup by its stack

I’ve been interested and reading up in startups in NYC, curious to see what stacks they use to power their applications.

A guy with background in Java set up a Java shop. Another company runs .NET as chosen by their CTO, and also because Microsoft allows startups use their software free/cheap for the first few years under Bizspark. An online publication that runs on WordPress is being moved to Drupal because the CTO is an expert in Drupal.

Question: Does the benefit of expertise in a particular stack outweigh the benefit of using modern solutions that are more attractive to programmers?

What do some seasoned experts think? This deck by Joe Stump provides some advise:

As far as technology, go with what you know. – Marc Cuban

The technology stack you choose is an implementation detail. – Joe Stump

What do you think? Ruby/Python/PHP are easy choices nowaways, but would you go with Java/.NET for building your next big project? How about a newcomer – node.js?

Adobe leading with web standards: PhoneGap and CSS Custom Filters

Everyone remembers the HTML vs Flash debate from a couple of years ago, when it seemed like Adobe fought hard for Flash to stay relevant, when Apple declined to support it on iPhone. Fast forward to today, and look, ma – Adobe embraced mobile and web stardards, and more than that – now it owns 2 fascinating technologies that were discussed at the last Show&Tell meeting presented by our UI guru Brian.

PhoneGap (also known as Apache Cordova)

What it is

Mobile development made easy – build apps for 7 mobile platform using web standards (HTML/CSS/Javascript)

Why use it

Quicker development for multiple platforms. Instead of time/effort investment for native iOS, Android, Windows development separately, use one codebase and PhoneGap will adapt your app to multiple platrforms. Allows access to native device stay relevant.

Why not use it

Some complex functionality will not be possible – augmented reality (AR) apps, high-performance games, so in these cases you will still need to develop native.

However, looks like for a good chunk of apps out there, PhoneGap would be a great way to go. One of the examples of their site is BBC’s Olympics app. Also, read their blog post on questions and myths about PhoneGap.

CSS Custom Filters (also known as CSS Shaders)

What it is

Web-standards, CSS-based cinematic effects in your browser. So you can warp your text in crazy ways, while adding blur or color inversion to your whole web page.

Why use it

Because the technology is moving forward fast and you want some crazy effects done with web standards! Forget Flash :)

Right now it’s in experiment mode and only works in the latest Chrome Canary or WebKit release, but give it a try – it’s really REALLY cool!

Variables in Mongo query

If you ever want to create dynamic queries that you will then pass to a Mongo command, here’s how to do it:

var query = {};
query['key'] = value; 

// check a condition		    
   query['key1'] = true;

    if(error) callback(error);

Mongoexport error: “too many positional options”

Had a quick task where I needed to export results of a mongo query into a CSV file.

Mongoexport command comes in very handy in this case.

I constructed my query:

mongoexport -h -d mydb -u myusername -p mypassword 
-c coll_name -q {tag:/mytagname/,count:{$gte:10}} -f tag,tag_date,count 
--csv -o test.csv

And when I ran it, got this error “too many positional options”

Some google groups suggest that you need to remove the space between -p and password, but it was actually fixed in the latest version.

The problem was caused by the lack quotes around my query – they need to be there. So the correct one looks like this:

mongoexport -h -d mydb -u myusername -p mypassword
-c coll_name -q '{tag:/mytagname/,count:{$gte:10}}' -f tag,tag_date,count 
--csv -o test.csv

Also, “-f” values (for field names) need to be comma-separated, no spaces.

Mobile: responsive, adaptive or optimized?

This is a question that we hear a lot lately: will my new website be mobile-optimized?

And before answering this question, letâ??s make sure all parties mean the same thing when they ask for â??mobile-optimizedâ?.

Hereâ??s how we at 360i define it:

Websites can be mobile-friendly and mobile-optimized.

Mobile-friently vs mobile-optimized

A mobile-friendly website is the SAME website that you see on a desktop browser or a mobile browser. Nothing in the layout of the site changes, but all content is viewable on mobile. So your users browsing from smartphones can still read and access all of your content. Most websites can be called mobile-friendly, except for sites built with Flash – they will not show on iPhone Safari browsers.

Generally, there is not much additional work in this case, just follow best practices when youâ??re building a mobile-friendly site:

  • use descriptive, semantic markup (appropriate header tags for headers, donâ??t include text as part of images)
  • minimize image file sizes for slower mobile connection
  • avoid Flash and advanced JavaScript/CSS animations

A mobile-optimized website provides a DIFFERENT experience when viewed in a mobile browser. The reason for this is to address the smaller screen size and provide the best user experience to your visitors who are on mobile devices.

Responsive vs adaptive design

There are two ways you can create a mobile-optimized experience:

1) Responsive website
Responsive design is a SINGLE FLUID design for all devices and screen sizes. Your page elements can be re-arrranged based on the screen size, but they are still same elements.


This is usually done with use of media quieries in CSS, and looks like this (very simplified example):

/* --------------- Tablet ------------- */

@media only screen and (max-width: 1024px) {
     /* your styles for tablet here */

/* ------------- Smartphone ------------- */

@media only screen and (max-width: 480px) {
    /* your styles for smartphone here */ 

2) Adaptive website
Adaptive websites present users with DIFFERENT designs, depending on the device and screen size.

This is accomplished by detecting the device (by checking the User-Agent header), which can be done either in JavaScript or server side. Hereâ??s a good site with script snippets for mobile browser detection.

Usually, once a mobile browser is detected, the site redirects to a mobile version.


Obviously, creating a mobile-optimized website (responsive or adaptive) would require more work, because you would have to either create a design that scales fluidly (for responsive sites), or create multiple design versions (for adaptive sites).

Here are some additional resources that help you understand these concepts:

1000 fans love MayNovember!

I’d like to applaud to my best friend Ohn for reaching 1000+ fans on Instagram! Girl – you rock!

For those of you who don’t know, Ohn runs a fun, vintage-inspired and affordable online boutique from the heart of NYC! Her unique style is the source of inspiration and admiration, and 1000+ Instagrammers agree! !

Hugo kudos to Ohn on working full-time, running the store and having fun! Check out for amazing jewelry, stylish clothing and accessories. Flat-rate shipping anywhere in the world, Facebook fans get extra discount!

And – new Fall collection coming soon, it’s time to refresh your wardrobe for the new season!

Fun Friday

Wow what a day at work, lots of love and fun projects.

A couple of weeks ago I put together a hosting recommendation our Bravo team (and we also did a bunch of other projects earlier), and look what I found today on my desk! A tshirt and an autographed Top Chef cookbook!


Such a cool and sweet gift! I will have to cook something out of that book, how about this intriguing dessert:

The thing that cracked me up: this “orgasm” requires tapioca pillows, takes 3 hours and requires chilling overnight! :D

This one looks super yummy too:

Also, my insights team told me today that they were able to use the CSV file (genereated by my quick/dirty python script) and make some neat charts out of it!

And, to make it even better, I’ve finally got a bit of time to add URL parsing feature to my app, tested and deployed it. Wish more days were so focused and fun!

Web performance meetup notes

Today’s meetup was pretty damn good!

The speaker was a former Yahoo developer, who now runs his own startup on gathering performance metrics for clients (LogNormal, using Boomerang).

The talk reminded me of a really fun class in school, where a teacher would start from the basics, then ask questions to make students think before revealing the answer.

Philip started with explaining what latency is (network latency in our case), how packets travel between client and server, what factors attribute to the response time shown when you do a ping request.

Some of my favorite bits were:

  • network throughput vs network bandwidth:

    bandwidth: overall capacity of network connection = what the ISP is advertising and selling to you

    throughput: what you actually get, given factors like usage by other people, etc. So know what you’re paying for!

  • and a question about planes: is it smarter to travel on a 737 that has a capacity of 150 people or 747 which has capacity of 400? The answer is, if you want to board and deplane faster, go with 737 – less people and luggage to load/unload

Then he moved on to explain how he runs tests using JavaScript in browsers to determine how fast the network is.

He also touched on some advanced topics:

  • under-the-hood browser specifics: how many requests you could send at a time (used to be 2) and how speedier modern browsers adjust that number (it’s around 10 now), and apparently Opera Mini is the fastest mobile browser right now.
  • shared tips on working around DNS lookups by setting up a wildcard DNS entry
  • provided comparison charts of US network speeds vs India – majority of India still has up to 2mbps connections, compared to up to 10mbps in US

Full deck, courtesy of Philip

Thank you Sergey for organizing and Philip for sharing great info!

Python > write to a CSV file with Twitter API lookups

As I wrote a couple days ago, I had a quick task at hand, where I needed to populate a CSV column with data from Twitter (lookup tweets given their IDs and find out source of each tweet).

First attempt to do it with node.js (for the sake of speed, plus I love node) did not quite work. So I decided to fallback on Python and write a quick and dirty script to scarlett johansson pokies get Pokies it done, forgetting about events and async calls.

The sample can be found on Github.

I’m still eager to get this done with node, so I can hook it up to Dropbox API and process those files automatically whenever the insights team needs them. And going to Python made me realize how awesome NPM for node really is! Painless module installs and a variety of modules to choose from – love!