Writing a simple web server in Python

And learning about Python’s Sockets and HTTP too!

Read More

Note to self for getting energy to work all day

  1. Be organized - Plan and put things in something like Trello so that I can start working as soon as I get in front of the computer.
  2. Diet -
    1. Skip snacks/sugary/greasy food
    2. More water, protein and veggies
    3. Limit carbohydrates
    4. More fasting
    5. Take advantage of coffee by drinking it between breakfast and lunch and not drinking it throughout the day
  3. Powernaps - I really got more done in those afternoons where I had a powernap right after the lunch.
  4. Take care of your eyes Follow the 20-20-20 rule to reduce eye strain. Also washing my face with cold water helps.
  5. Stretch - Got this tip from Freeman. He does this yoga kind of stretch while sitting for longer durations.
  6. Min. 7 hours of sleep You cannot get away from this. Sleep is very important to concentration and focus. Pulling all-nighters leads to sloppy code, which I’ll have to rewrite one day anyway. Also no “screen-time” before sleep. I am trying to practice a routine of falling into sleep by reading a book on the bed, just before sleep.
  7. Long Walks I tried to do meditation for years, but was not able to have a successful routine. However I found out that walking helps me more than meditation. Long walks help me relax, unwind and plan a lot! Also trying to do early morning walks, which also help me get the Vitamin D I’ve been missing :)
  8. Ergonomics Make sure that the ergonomics are right. I already have a good chair, thanks to my friend Rajeef. Next up, a good keyboard and headhpones!
  9. Recovery time in the weekend DIsconnect away from the work, communication etc and enjoy the nature with my family.

Read More

Setting expires header in Nginx

Or how to leverage browser cashing if you are using Nginx.

Read More

Reading programming books

I love reading programming books. That is how I got started in the world of programming. With 24 hour internet, my reading habits, especially programming books, has changed. Going through blogs or searching on stackoverflow.com feels faster and efficient than going through a dense technical book.

Read More