Profile

Cover photo
Derek Hohls
Works at CSIR
Attended University of KwaZulu-Natal
735 followers
AboutPostsPhotosVideos

Stream

Derek Hohls

Shared publicly  - 
 
How could I have possibly missed this before??

#musk   #iainmbanks   #theculture  
While he’s working on getting humans into space, SpaceX CEO/CTO Elon Musk hasn’t forgotten the greats who propelled us out of the stratosphere through fiction long before him. Today, Musk tweeted t...
1
Udenyi Patrick's profile photo
2 comments
 
I said yhe Holy Rosary daily & I got responses. Why these mutha fuckas don't believe she gave birth to Holy Jesus? #delusional
Add a comment...

Derek Hohls

Shared publicly  - 
 
Watching our planet...
1
Add a comment...

Derek Hohls

Shared publicly  - 
 
Python Imports

In your Python code, you may have:

    from views import * 

This style of import is called "implicit relative imports", and you  should never use it. It is deprecated in Python 2, and doesn't work at all in Python 3. (You can opt in to the Python 3 behaviour in Python 2  with "from _future_ import absolute_import".) 

The reason it is "implicit" is because it is ambiguous - the  "views" module you are importing from could be relative to the current module location, or "absolute" (directly on sys.path), and it opens the possibility of accidentally shadowing a top-level installed module (even a stdlib module) with a local module (e.g. if you put a `datetime.py` or a `django.py` into your package), causing hard-to-debug issues. 

(Also, as has been mentioned, you shouldn't use `import *` because it  leads to ambiguity as to the source of names in your code.) 

The right way to do relative imports is with the explicit syntax: 

    from .views import some_view 

or to import a whole module: 

    from . import views 

Using the `.` make it explicit that you are importing from a local module relative to your current module, not from a top-level module. 

(Thanks to Carl Meyer!)
This is mostly a cosmetic question, and I could be completely wrong because I'm fairly new to Django, or it could be that there is a perfectly logical explanation for this, but here goes: It seems the code required to import views in urls.py and models in views.py is inconsistent (and in the ...
1
Add a comment...

Derek Hohls

Shared publicly  - 
 
Q: Where is the International Space Station??
A: http://iss.astroviewer.net/
The current position of the ISS and its ground track.
1
Add a comment...

Derek Hohls

Shared publicly  - 
 
TL;DR - Programmers today never had to actually study Computer Science!
And why it sucks to be a beginner today…
1
Add a comment...

Derek Hohls

Shared publicly  - 
 
The final frontier ... Voyager 1 has been travelling for nearly 40 years ... but in terms of the galaxy has barely stepped through the door into our local neighbourhood.

http://eyes.nasa.gov/dsn/dsn.html
1
Add a comment...
In his circles
178 people
Have him in circles
735 people
Abdullah khan's profile photo
Ashley S's profile photo
Thanh nguyen's profile photo
Senad Meškin's profile photo
Anne Simonen's profile photo
Raimund Mueller's profile photo
Marinho Mario R. Williams's profile photo
Blake Scott's profile photo
Jonathan Smyth's profile photo

Derek Hohls

Shared publicly  - 
 
Life in Africa is interesting ... but short.

(via: http://www.worldlifeexpectancy.com/life-expectancy-africa )
1
Add a comment...

Derek Hohls

Shared publicly  - 
 
Wait, there is a con already?

#docker  
CoreOS and Docker are working on a common standard for software containers with the announcement of the Open Container Project
1
Add a comment...

Derek Hohls

Shared publicly  - 
 
Interesting thread on QGIS and the use of FOSS solutions (vs proprietary options) in GeoSpatial arena for local government bodies.

#FOSS    #QGIS    #GeoSpatial  
1
Add a comment...

Derek Hohls

Shared publicly  - 
 
Interesting approach to distributed architecture development.
 
I endorse this: build a monolith first, then decompose into microservices.

Another argument that +Martin Fowler doesn't make, but I would, is a kind of reverse Conway's Law: the architecture of the software will be reflected in the communication structures of the team.  When starting a project you don't want to let people or groups go off and work in isolation.  

In some sense the peeling off of microservices is a natural maturing of a project, where you think about new aspects of the project in relation to how they are different than how the project is currently.  But when starting a project there isn't the shared understanding of the existing product, and you need to actively build that shared understanding.
Going directly to a microservices architecture is risky, so consider building a monolithic system first. Split to microservices when, and if, you need it.
8 comments on original post
1
Add a comment...

Derek Hohls

Shared publicly  - 
 
RabbitMQ scales!
Google Cloud Platform can rapidly provision and scale virtual infrastructure on which to build web and enterprise applications. Recently, Google and Pivotal engineers collaborated on a performance study of RabbitMQ running on Google Compute Engine. The RabbitMQ message broker was deployed atop ...
1
Add a comment...

Derek Hohls

Shared publicly  - 
 
So true, so sad.
 
Who's up for these? :-) 

If I get enough thumbs-up, I'll get things rolling now now :-) 

Edwin
View original post
1
Add a comment...
People
In his circles
178 people
Have him in circles
735 people
Abdullah khan's profile photo
Ashley S's profile photo
Thanh nguyen's profile photo
Senad Meškin's profile photo
Anne Simonen's profile photo
Raimund Mueller's profile photo
Marinho Mario R. Williams's profile photo
Blake Scott's profile photo
Jonathan Smyth's profile photo
Work
Occupation
Software Developer
Skills
python, django, html, databases, gis, proof-reading, listening, designing
Employment
  • CSIR
    Programmer, 1991 - present
  • DWA
    Engineer, 1987 - 1990
Basic Information
Gender
Male
Story
Tagline
husband, father, christian, programmer, reader, boardgamer... and person-under-construction
Introduction
Yes, this is the correct Derek!
Education
  • University of KwaZulu-Natal
    Bsc Chem Eng, 1981 - 1986
  • Durban High School
    1976 - 1980
Links
Other profiles
Contributor to