Life Of Navin

Random Musings, Random Bullshit.

kc

I'll Be There For You...

Yesterday was a shitty day. A very shitty day. And for no good reason at that. It was just one of those days where everything seemed to be going wrong. I woke up sick, feeling nauseated, skipped breakfast and lunch, stubbed my toe, was constantly hounded to work on something that I honestly was in no mood to do, and it seemed like every single person I can speak to was out for the final day of our intra-college sports festival, Spandan.

It's really hard to explain why some days are bad. Was it homesickness? Or loneliness? Or the fact that I'd lost two out of three events I was participating in at Spandan? Or boredom? Or plain burnout? Or something else? I honestly have no idea. But whatever the reason, I was facing a bout of extreme depression, and feeling completely burnt out.


My self-help cure for days like this is:
The Chica List, for the uninitiated, is a group of girls who I love more than anyone else in the world. These girls are, simply put, the awesomest people I know, and have collectively, seen me through thick and thin, helping me out in my many awkward moments of crisis. Be it through random ranting, PJ-cracking, advice seeking or advice giving conversations, it's unbelievable how close we've gotten over the years. And today was a day when, having already done the two out of four items in my list, I badly needed a chat.

All it took was one phonecall:
Me: Hey shorty, long time... how you been? You free?
Av: Hey maggi, wassup? Have a French exam in a few hours... wassup?
Me: Ah k... study then. Talk to you later.
Av: We both know that's not happening. What's up with you? You sound sick
Me: Not sick really, just feeling shitty...
Av: Ah, so it takes a shitty day for you to remember me eh? Ass!!
Me: No, nothing like that... it's just...
Av: Yeah, yeah, bahaane bana ab tu. Anyway, bata, kya hua?

And with that started one of the most fun conversations I've had over the phone in a long, long time. Over the next hour and a half, I reconnected with someone who I haven't really spoken to as much as I should (completely out of my own self-imposed excuse of lack of time), ranted my heart out about everything good, bad and ugly, and whacked myself on the head repeatedly upon being told to do so over the phone. :P

As always, I got some amazingly sound advice, and by the end of the conversation (which mostly happens not when we run out of things to say, but when we run out of balance), I was feeling awesome again.


I went out, grabbed something to eat (including a Dairy Milk, thus completing the list), met a few people, cheered for a couple of friends participating in events and the world was all unicorns and rainbows again.

Thank you Av. You really don't know how much you mean to me. I know I'm an ass most of the time, but I honestly want to take time out to say you're a super-awesome person, and you mean the world to me. :D

When I got back after all the hullabaloo, I saw that I had an email, with a photograph of myself from a time not so long ago, along with the quote, "It's just a bad day, not a bad life" followed by "PS. flunked my French test, but would do it a trillion times over for conversations like today :-p".


As the song goes....

I'll be there for you, When the rain starts to pour
I'll be there for you, Like I've been there before
I'll be there for you, 'Cuz you're there for me too...


There are days when I wake up thinking it's the worst day ever and go to bed thinking I'm the luckiest guy alive. Thanks for always being there for me. :)

This. Very. Moment

Thank you for understanding.

Review: PyCon India 2013


The 2013 edition of PyCon India ended yesterday. The event has scaled beautifully over the years, and the level of PyCon India has definitely gone up by a few notches, year over year. Despite a few challenges (mentioned at the end of this post), I personally believe PyCon India has had a strong effect in encouraging Python developers, from newbies to baptized Pythonistas, to work hard, and create awesome stuff. As a volunteer for the event, I had a lot of fun getting to know the who's who of the Indian Python community, meeting old friends, and hanging out with new ones. :)

My favorite talks from PyCon India 2013:
1) Kenneth Reitz's keynote (aka "Python for Humans - Remix"):
Kenneth's keynote was a great talk, focusing on Open Source, and how we, as developers need to work towards developing products that are made FOR developers. Also touching on things that open source contributors and maintainers, need to remember. It was a lovely talk along the lines of "With great power comes great responsibility", and personally very enlightening.

2) "We're Building Skynet and it loves Python" by Dhananjay Sathe:
I couldn't attend the whole talk, but the bits I could attend, I really liked. Dhananjay spoke about cloud robotics, and border-lined on a lot of tech that sci-fi movie makers would be proud of. The guys at RoboEarth are doing a tonne of really cool robotics stuff, and it was super cool to have a glimpse at the stuff they're working on.


3) "Predicting Black Swan Events" by Michael McKerns:
This was a hardcore mathematical talk  by Michael from CalTech, speaking about frameworks such as Pathos and Mystic, and their use to solve real world prediction problems known as Black Swan events (i.e. events whose occurence is rare, but reward on occurrence is very large.). Having moved a little towards multidimensional, unconstrained problems over the last few months, this talk was very very interesting to me.

4) "Experiments in data mining, entity disambiguation and how to think data-structures for designing beautiful algorithms" by Ekta Grover:
Ekta's talk on data mining web scraped data, specifically from LinkedIn, was a real cool talk about the challenges faced during the process of Data Mining. Having worked with some very large datasets in the past, and having had a fair bit of experience in data mining, this talk was helpful for me to clarify lots of things. Though showcasing almost no code, which is something I would have liked, this talk was very interesting

5) "Scrape the web using Scrapy" by Anuvrat Parashar 
The final talk I attended at PyCon India 2013 was the talk by Anuvrat. Scrapy is one of my favorite Python web scraping modules, and Anuvrat had a very entertaining talk on the same. Laced with witty humor, real-life experience and lots of live-coding (Yay! :D), the talk on Scrapy was the cherry on the cake. A well deserved awesome ending to an awesome conference.


Besides the talks, I had a couple of really interesting talks with people from different segments of society, who attended PyCon, ranging from students to industry professionals. Special mention of Ajith Kumar sir, who works with particle accelerators for a day job, and promotes Python with a passion. His concepts of focusing on IT-enabled education, rather than just IT education (i.e using Computer Science as a tool to aid other fields of knowledge) was really practical,and concepts like that go a long way in helping bring Computer Science into the mainstream.

The panel discussion on Python in Education, which was a first of PyCon India was a really live discussion, and brought many topics, which need to be discussed, out in the open. The landmark judgement by CBSE has brought Python to the spotlight, and it's up to each one of us to ensure that all the work that's gone into this doesn't end up going to waste.

Coffee chats with the guys from BlueJeans, and other PyCon India volunteers (which included people from RedHat, Fedora, Apigee, Agiliq, a couple Mozilla Campus reps, and an Oracle employee too :P), and dinner with the guys from Goibibo was a lot of fun, and I personally gained a lot of insight from these small conversations with like-minded hackers. :)


The major challenge I see PyCon India facing is that with more people learning about python, the attendees at PyCon are people ranging from newbies to advanced users, and hence the talks need to be decided in a better manner. I had a few people tell me that they felt the talks this year were too advanced, while others said they were too n00bie-oriented. This is a challenge that has no easy solution, but needs to be looked at. Another issue was the issue of speakers' suggesting one paper during the CFP, and presenting on a completely different topic altogether. Again, this is a very subjective matter, and we need to make sure from our side that presentations don't become too commercial in nature. It is understandable why companies want to use PyCon as a platform to pitch products, but during a talk is not the place to do it. Dhananjay Nene came up with this really thoughtful conference speaker checklist :

* First think of what value the audience is going to get out of it, not the sales value or the bragging rights for the speaker.
* If you are going to talk about how cool your company is, get it done very quickly, in the first couple of minutes.
* Realize the core value the audience seeks. If they are a bunch of python developers don't stick them with a long lecture on consumer psychology. Give them something that they as python developers find useful.
* Do not make the title of the talk much grander than the content. The two need to be consistent
* Keep the title of your talk unambiguous. Else you will have a larger proportion of bored, uninterested audience, who will frequently be walking out of your talk.
* Don't reuse sales collateral blindly. Pass it through the relevance filter
* And please don't just talk about what considerations programs should be written with - show the code.

Overall, PyCon India 2013 was a lot of fun, and I can't wait for the 2014 edition to come by. Until then, import antigravity and keep hacking.

PS Hat-tip to the designers of PyCon India 2013... The banners, tees, etc were all excellent, and easily the best amongst the last few iterations of PyCon India :)

Are ORMs Making Us Forget SQL?

The folks at JitBit recently came up with a very nice blogpost about their SQL hiring practices. You can read that blogpost here. The post sparked a debate on HN and other dev sites on whether ORMs are making people lose touch with SQL or simply abstracting the lower level database logic from the developer. The discussion from both camps is very interesting, with valid points being made to support either side. Personally, I feel ORMs, databases, programming languages and even programming paradigms are simply tools in a developer's arsenal. You use the right one for the job. The tools you choose for a simple PoC are completely different from the ones you choose for an enterprise project. If they're not, you have a serious problem on your hands. Unfortunately, too few developers understand this. Programmers need to be, by default, polyglot. I personally believe that the whole process of "Engineering" education is simply trying to instill that virtue in you. How successful the *system* really is (as always) open for debate.

Anyway, coming back to JitBit: They had a simple problem asked to their prospective future employees. In their own words:

The test's job is not to tell genius and rockstars from "normal" devs. The purpose is to save you time and quickly filter out DB-experienced guys from the ones that just claim to be.

Here's some solutions that me and Damodar came up with to the question in the blog. Can you spot the flaws in them (a few are obvious ;) )? Or come up with something that performs better? Let me know in the comments :)




Question: For the schema given above, answer the following questions:
  1. List employees (names) who have a bigger salary than their boss:
    SELECT employee.name FROM employees AS employee WHERE employee.salary>(SELECT salary FROM employees WHERE employeeid=employee.bossid);
  2. List employees who have the biggest salary in their departments:
    SELECT  name FROM employees AS employee WHERE employee.salary=(SELECT MAX(salary) FROM employees WHERE departmentid=employee.departmentid); 
  3. List departments that have less than 3 people in it
    SELECT name FROM departments AS employee WHERE (SELECT COUNT(employeeid) FROM employees WHERE departmentid=employee.departmentid) < 3;
  4. List employees that don't have a boss in the same department
    SELECT name FROM employees AS employee WHERE (SELECT departmentid FROM employees WHERE employeeid=employee.bossid) != employee.departmentid;
  5. List all departments along with the total salary there
    SELECT name, salary FROM departments LEFT JOIN (SELECT departmentid , SUM(salary) AS salary FROM departments GROUP BY departmentid) AS employee ON departments.departmentid=employee.departmentid;

... Looking forward to being corrected by your alternative solutions :)

---
PS Speaking of PoCs, If you're a Java web developer, check out Spark. It's a web development framework inspired by Sinatra. Been using it quite a bit for the PoCs I've been working on recently. :) 

Prologue

Finally after all these years, here's to the beginning of what was there, what is there and hopefully what will remain!! So here are my thoughts & words -Online!!

Blog Archive