HN user

lazyfunctor

32 karma

Full stack web developer (leaning towards backend) based in Bangalore. email: abhinav.kaushik@gmail.com github: https://github.com/lazyfunctor

Posts4
Comments52
View on HN

I've read this advice couple of times "convert your unit tests to assertions". What does it actually mean? Say in the context of web dev, you add assertions to the code and when they fail you log an exception and move on?

Any links related to it will be helpful.

Interesting! I wonder if someone can help me with a problem I'm facing with cgo. I'm trying to include go runtime as apython module (.so) and the code appears to work fine as a standalone program. But when I try to run it from a pre-forked process manager (say Celery for python) the code gets stuck at runtime.futex (from strace). I guess some interplay of python and go runtime w.r.t goroutines. I feel Go is not meant to be embedded in Python runtime.

Code here: https://github.com/lazyfunctor/pymosaic

Edit: Added last line

SEEKING WORK - Bangalore - Remote

Experienced software developer (full stack with backend leanings)

  * python (Django/DRF/Flask)
  * Javascript (react)
  * Go
My expertise is solving hairy/messy problems involving integration with legacy codebase, though that is not the only thing I am good at. Some of my last few projects include integration of a django component that I wrote with a legacy codebase in PHP and a WYSIWYG(almost) editor for PDF generation.

GitHub profile: https://github.com/lazyfunctor

email: abhinav.kaushik@gmail.com

Django-hijack 1.0.2 12 years ago

Sounds interesting. This could be really useful.

In my previous project for a client I implemented a similar feature (though I named it masquerade).

Thanks for sharing it.

Three years back I quit after 10 years of smoking (cold turkey). My notion of smoking was associated with break from work. So I replaced it with green tea and red tea(rooibos). You can probably give that a try.

Another thing that helped was sports, I started playing squash. I tried to be in better cardiovascular health to play squash, another motivation. Maybe you can pickup something (gym, any sport or anything physical)if you are not already doing that.

Unpythonic Python 12 years ago

Mine with some itertools abuse :)

from itertools import cycle , izip

[(f + b or x) for f, b, x in izip(cycle([''] * 2 + ['Fizz']), cycle([''] * 4 + ['Buzz']), range(1, 100))]

Edit: not sure how to post code in comments. e.g. * is lost

I am not sure if I get your question. I think this query should work

"select country, state, city, SUM(sales), SUM(profit) from foo group by country, state, city with rollup;"

for a table with country, state, city, sales, profit as columns