Getting back with the Django Logic

These past weeks I have gone back to my Django resources to try to learn the last stages of the Django modules, business logic, etc.

I most say that I have actually skip most of the documentation and gone into more trusty tutorials that do one task, and learn from it.

One of the tutorials I found was for the CRUD system, something basic enough to grasp it easily. However, even then it wasn’t as easy as I thought.

The writer develop an internal debate between a Class based view, and a Function based views. As you know, Views is where the business logic of the applications are. So even if this learning was good and simple, I might need to multiply it by 2. Not that is necesarily bad, but still, wish it was simple.

I went to a DjangoCon videoset on youtube. One of those was about teaching Django at University, and there was a very interesting explanation on how Django sometimes is unecesarily complicated. Also some recomendations like the Django Girls group, and a book called Two Scoops of Django, something that I already had on my resources.

This gave me some idea into their philosophy. Hearing someone recognizing that the documentation is not always the best way for learners to understand whats going on. Building on top of an understandment is something that is helpful for learners build their best interpretations.

Telling a n00b to study this documentation with everything you will ever needed inside doesnt mean he would actually go through it all. On other words, most people will rather create a fix for their inmediate need.

At the moment some of these needs are:
– Creating a cookbook
– Creating mentoring mechanisms
– Generating 50 shot view of whats going on

Advertisements

Python on the College Scene

Python is the most frequently taught programming language in introductory computer science classes. There are many universities and colleges training students in Python, as well as many online classes to help introduce new people to coding, via Python.

Not sure if I would see this coming soon to universities around the world like Latin America and Africa, but I hope that there is a change of heart at the universities and start pushing innovation.

pyuniversities

Update on the OpenUpgrade migration

After some detailed review of the logs and re-watching the conference on OpenUpgrade I was able to identify key things about the way the migration take place:

  1. Carefully reviewing the error message.
  2. Understand the script is not bulletproof and seems to preffer debug than skipping errors.
  3. Keep your SQL hat at arm reach.

I was able to run openupgrade with some success but there was a lot of missed shots and even this one is still not a hit yet, but is getting closer.

The Main error had to do with two tables, res_users which hold the application users, and res_company that holds the clients.  We can first look at error log:

2013-12-17 06:49:50,310 28794 ERROR astro_migrated openerp.osv.orm: Can’t find field ‘context_tz’ in the following view parts composing the view of object model ‘res.users’:
 * res.users.form
 
Either you wrongly customized this view, or some modules bringing those views are not compatible with your current data model
2013-12-17 06:49:50,311 28794 ERROR astro_migrated openerp.osv.orm: Can’t find field ‘menu_tips’ in the following view parts composing the view of object model ‘res.users’:
* res.users.form
Either you wrongly customized this view, or some modules bringing those views are not compatible with your current data model
2013-12-17 06:49:50,312 28794 ERROR astro_migrated openerp.osv.orm: Can’t find field ‘context_lang’ in the following view parts composing the view of object model ‘res.users’:
 * res.users.form
 
Either you wrongly customized this view, or some modules bringing those views are not compatible with your current data mod
The other table is the one related with the fields property_reserve_and_surplus_account, and the security_lead. for the res.company table.

3699 ERROR astro_migrated openerp.osv.orm: Can’t find field ‘property_reserve_and_surplus_account’ in the following view parts composing the view of object model ‘res.company’:
* res.company.form.inherit

3699 ERROR astro_migrated openerp.osv.orm: Can’t find field ‘security_lead’ in the following view parts composing the view of object model ‘res.company’:
* res.company.mrp.config

The next step is to review the way the error as I login to the migrated database shows up on the screen and the actual error that sends:
ProgrammingError: column res_users.alias_id does not exist
LINE 1: …CT res_users.”menu_id”,res_users.”gmail_password”,res_users….
                                                                               ^
This error basically tells me that the res_users is wrong due to some missing information regarding the column res_user.alias_id. I still need to crack this one, but fortunately this will help me solve the rest and would be able to finally get the migration concluded.
I can almost be certain this has to do with the database and that there have been issues related with SQL queries.

Python Certification and O’Reilly

Today I saw this great conference about the Python certifications that O’Reilly (the company that does IT books) is offering through their school of technology.

A few month’s back there was a rather interesting discussion bout the value of a certification, and how many people disagree about the nature and the goals should be. However is good to know that there are some certifications available and even better that they are connected some how with an authoritative figure.

In this case The Python Foundation chairman is one of the designer of these Python Certified Class. This O’Reilly Webcast show the whole process and thought put into this program and how it can help many people that want to get into programming as we all develop core knowledge.

The video is here:

Some notes on the video are the following interactive Q&A and some key minutes in the presentation:

Min: 15 Biggest difference between Python and PHP? The use of namespaces to create larger systems.

Min: 17 Which toolkit (or UI) will the course include? Several frameworks like TKinter, PyQt y WxPython were reviewed. In the search for pragmatism we choose Tkinter, but in a way that is easily portable to Qt, GTK, etc.

Min: 19 The courses are credited by the University of Illinois.

Min: 23 How will these course help more experienced programmers? You can skip the entry-level classes although if you want the certificate you most take them at some point.

Min: 28 Explain the story on why The Python Foundation don’t offer the certifications directly and how data is not equal to knowledge and experience.

Min: 31 who do the grading? Is a combination of members of the University of Illinois and O’Reilly School of Technology.

Min: 32 Why does the Python course looks more involved than the PHP course? The approach to the PHP course is different and Object oriented is been reviewed further  in the course.

Min: 34 Sneak peaks on the second class? Second class would deal with testing and development. Things like unit testing.

Min: 36 deals with packaging and how to generate packages in Zip, tar, etc.

Min: 42 what kind of jobs can I obtain from these classes and certifications? Right now programming skills are very well marketable although usually is focused on programming jobs. However, we see these programming courses to extend to other disciplines like journalism, technicians, educators. Also the curriculum and portfolio of real code that can get you a Jr Developer position.