Blog

$ less blog.txt
This page is still kind of buggy with the pagination and format. If you prefer, see an archive of all of my blog posts.

Debugging like a Boss with Slack

2019-07-11

Edit: This article also got published on the GoodAudience Blog.

I’ve been using println debugging since forever. It’s the best! It’s minimal, is the least surprising form of debugging, and allows you to set-it-and-forget it. I’ve also used interactive debuggers before, but when println debugging techniques are used effectively, I’d argue that step-through interactive debuggers are not necessary at all, and actually slow you down.

For years now, I’ve been using an evolved form of println debugging, which I affectionately call “Slack debugging,” and I’ve written various manifestations of utility/helper functions called slack_debug over the years.

This has been a close-kept secret for myself and select other teammates and colleagues who were curious to know what exact wizardry I was doing.

And now, for the first time, I’ve decided to clean up the solution, open-source it, and share it with the world.

Behold, the Power of “Slack Debugging”

In [1]: from htk import slack_debug

In [2]: from htk import slack_debug_json

In [3]: slack_debug('This is seriously awesome!')
Out[3]: <Response [200]>

In [4]: slack_debug('Yeah, no kidding.')
Out[4]: <Response [200]>

In [5]: slack_debug_json({'A':1,'B':2,'C':3,'X':['foo','bar','baz'],'Z':{'nested_key':'nested_val
   ...: ue'}}),
Out[5]: (None,)

Debugging like a Boss with Slack

And without further ado, Slack debugging is available here: https://github.com/hacktoolkit/python-htk and https://github.com/hacktoolkit/pyhtk-lite. (And for Ruby: https://github.com/hacktoolkit/htk-rb).

Love it? Hate it? Please share your thoughts and comments, or even better yet, submit pull requests to make it better!

Kill Netskope Client on Mac

2018-10-23

Netskope is a corporate security tool installed on corporate-owned devices that will introduce and override the default SSL certificate authorities by injecting its own local server.

For developers, this often poses an inconvenience especially if they need to develop applications that make API calls and HTTP requests to other web services, if the developers are hitting a web service that has not previously been white-listed by the IT department. The IT department may not be in close communication with the engineering teams, and require additional information from the developers in order to configure a new whitelist rule, impacting the ability of engineers to meet deadlines.

tl;dr; How to kill temporarily disable Netskope

sudo launchctl unload /Library/LaunchDaemons/com.netskope.stagentsvc.plist

TIL: pbcopy

2018-10-03

TIL: Discovered a super game changing technique. From command line, you can copy contents of any file to Mac OS clipboard by running this command:

  1. cat yourfilename.txt | pbcopy
  2. Open your other application, press Command+V to paste as normal
  3. Profit. Immensely.

When Slack links don't work, Restart Google Chrome

2018-03-01

Periodically, web hyperlinks in Slack would stop working.

The fix is surprisingly quite simple: Restart Google Chrome.

The best way to restart Google Chrome safely and preserve your current open tabs is to type into the address bar:

chrome://restart

Is there an engineering talent shortage in Silicon Valley?

2017-10-16

Yes, there is a huge engineering talent shortage in Silicon Valley. There are more companies trying to build disruptive technology that have greater hiring needs than the available supply of engineering talent.

I currently work at Iterable, and we are as of present a Series B company with around $30M raised total. We get hundreds of applicants a week, but few of them are qualified enough. I joined as the 3rd engineer of the company and now we are around 20 engineers; virtually every single engineering hire on our team has been an internal referral.

A company like Iterable is able to reward any qualified engineer quite handsomely; but for these top candidates, they are often like the proverbial kid-in-a-candy-shop and are highly sought after by multiple companies working on the most exciting, cutting edge technologies.

Iterable is poised to be a unicorn or deca-corn some day, as we are quickly becoming one of the essential, best-in-class tools for omni-channel growth marketing automation.

I love to reason and explain concepts using analogies. If you look at the world of professional sports, such as basketball or baseball, you will know that it seems every year, only a few teams consistently make it to the playoffs, semi-finals, and then finals. The teams that make it to the post-season are a small fraction of the total number of teams in the league; an even smaller fraction are serious championship contenders.

If you equate working at a software company in Silicon Valley to being an athlete that makes it to the MLB or NBA, then you will have a very good idea of what people are talking about when it comes to shortage of engineering talent. Many players are simply happy and consider it to be a life achievement to make it to the pro-leagues; only some of the players who are the hungriest and want to achieve greater success are willing to put in the hard work and dedication to reach the upper echelons of the game—whether it be basketball, or baseball, or software engineering.

Furthermore, just as you have specialist positions in basketball, the same also applies to software companies. To be a championship contender (e.g. IPO, $1B+ exit, etc), you need the absolute best, top-notch talent in each position — backend engineers, frontend engineers, infrastructure engineers, security engineers, mobile engineers, etc, and finding top notch talent to fill each of these positions is quite challenging and difficult. It takes years and years to hone and finely tune the skills in any particular area, such that for any position, there are only a few candidates who possess the skills, and then even fewer who are available and not already committed to another team, or working on their own startup.

Hence, it is quite safe to say that there is a huge shortage of engineering talent in Silicon Valley.

Edit:

Initially I did not think to make this a “recruiting” pitch for Iterable (seriously), but just to give an idea of how good we have it, here are some of our perks:

  • Free lunches every day, catered by Zesty, from a variety of top eateries in San Francisco. Fridays we can eat out anywhere, with the team, and just Expensify it. On several occasions we’ve eaten at places where it cost more than $30 per head.
  • Quarterly stipend of $300 for personal / professional development — I use it to buy books, audio books, and an Audible subscription — for any employee, not just engineers.
  • Monthly stipend of $160 for gym membership. I use it for gym membership and workout sessions with a personal trainer — for all employees.
  • Quarterly team off-sites — this past week we did an escape room as an engineering team, for team bonding
  • Semi-annual (twice a year) company outings — an annual sailing trip on the San Francisco Bay, and an all-expenses-paid company retreat (we went to Bodega Bay this past year)
  • Monthly all-hands and office happy hour with lots of beer and delicious food. I don’t really drink, and there are lots of non-alcoholic options
  • Fully stocked kitchen, refrigerators, and snacks with fresh fruit, kombucha, Stumptown coffee, Quest protein bars, Krave beef jerky, Tcho chocolate, etc luxurious snacks
  • Expense ANY computer hardware, monitors, or desktop equipment. Some of my teammates have dual 34″ ultra widescreen curved monitors and $300 mechanical ergonomic keyboards and vertical mice
  • Expense ANY resources needed (software, IDE, books)
  • Flexible vacation, flexible hours, and flexible location (remote)
  • Interesting guest speakers and world-class learning opportunities — the former CEO of Twitter, Dick Costolo, came in for a fireside chat

Here are some photos from the above mentioned team outings: Iterable

Even with all of these amazing perks, not to mention being able to work with some of the top minds and high achievers in the industry, we have been having such a hard time finding engineers that meet our bar for good talent and good culture and team players (you see, just like in sports, sometimes you have superstar athletes who are not team players, and these would be simply toxic to your organization).

Iterable is currently ranked at #1 on the SaaS1000.

If you’re out there, would you please DM me?

Edited Oct 27, 2017:

Someone just shared this article with me that describes the housing crisis not just in Silicon Valley, but in all of California: https://www.bisnow.com/national/…

There is a severe engineering talent shortage in Silicon Valley, and that goes hand-in-hand with the housing shortage in California.

View original question on Quora


Make a Donation