Django and Mongo experiments

I have recently got excited with MongoDB. In in my work we are developing a EHR with patient facing apps. We started with a popular open source which is based on RDMS. We had to develop a lot of custom logic for doctor facing front end.

MongoDB is easy to start with. The schemaless documents means we can use it for quick prototyping and when things are not much stable. From the EMR perspective, storing medical documents in a document database makes much sense.

Though Django does not have inbuilt support for MongoDB, the community has really gone ahead and come with innovative ODM solutions like MongoEngine.

I will post more about my learnings in this blog,

First work day

Today is a special day. I started work after college on July 5, 1999. I really count this day as special. Life has shown any ups and downs. But I am very thankful for the start I got in my career.

Some highlights:

  • Our attitude is very important. Some times, because of failure we have a poor concept of ourselves and we really start selling us start
  • Think Big really works
  • Working with great manager instill good work habits
  • Work is not everything. There are other things in life
  • Just because we are success in work does not mean we are superior to others
  • Not every body can do great or bring their best to work. We have to understand the issues people face in life and empower them to work better
  • Relationships are very important
  • We definitely have to do some mistakes in our career
  • Having mentors helps

I am planning to write some thing about career also from now on.

 

Refactoring

Refactoring is a key activity in ongoing software maintenance. Though there are lot of documented literature and tools provided by IDE for refactoring, refactoring have to be done on case by case basis.

I am currently learning refactoring from the book refactoring. To improve my learning I am also refactoring source code of a previous project I worked and am improving it and making it in a maintainable state.

Will be adding more posts on my learning’s related to refactoring.

Grails Exceptions

Grails is a excellent framework offering very high productivity. The usage of Groovy as the programming language makes Grails a very productive framework.

Grails is notorious for raising a lot of exceptions and some times it is really hard to figure out what really caused the exceptions. A normal exception may be easily 1000 lines and that makes it really hard for figure out where exactly is the cause of the issue.

To add to this, some times we get an exception right when we start running the app.

A good tip, I have noticed in debugging Grails exceptions is that to look for area in our code where an exception occurs. This may some times be the last item on the exception stack. Fixing the issue in our code may very well lead to the exception to disappear.

New Year 2016

The new year has started today. I hope this year brings in good things in life to the world in large.

I have put down the below as my resolutions for this new year. Let me see how much I can achieve them:

  1. Learn python for an hour daily
  2. Practice python for an hour daily
  3. Complete udemy courses
  4. Become good in databases
  5. Develop a great memory
  6. Develop Positive attitude
  7. Make my marriage richer
  8. Cut down on poor habits
  9. Blogging regularly on my learnings
  10. Learn arch concepts
  11. Master Design patterns
  12. Get deeper into web development
  13. Meditate daily
  14. Develop Speed reading
  15. Learn touch typing
  16. Exercise and bring health to good shape

 

 

Learning Entity Framework with Asp .NET MVC

Entity framework forms a bulk in learning MVC. There are very less resources for learning Entity Framework.

Books by Julie Lerman are very comprehensive and they look like the authoritative source for reference to Entity Framework.

There is a big tutorial for MVC and Entity framework in asp .net site http://www.asp.net/mvc/overview/getting-started/getting-started-with-ef-using-mvc/creating-an-entity-framework-data-model-for-an-asp-net-mvc-application

Currently I am going through this tutorial and will blog about this.

You can download the completed code and then quickly browse the source code. But what I noticed is that you cannot straight use code first default initialization as you get foreign key errors when you use the initialization code in the DAL folder.

Using the update-database on NuGet console, you can force the seed script in migrations folders to run which sets the correct database for the downloaded application.