Services
Blog
Français
Whether you are just a linux user or an indie game developer, you’ve got to try out desura which is open source.
Just click “Linux” -> “Download” -> run the small file -> it will auto update and greet you ! As simple as 1, 2, 3 !
By Ken Thompson.
There sure are a lot of resources in the big badass list of twitter bootstrap resources.
It’s time to replace calls to prompt(), alert() and confirm() in your javascript with this awesome plugin by Fabien Doiron.
Good documentation should be readable from source, and usable to generate fancy HTML. That’s why RST is so commonly used:
Good documentation should often show code. This article demonstrates an inconsistency between RTFD and GitHub rendering, and how to fix it.
As far as sphinx is concerned, the default highlight language for code blocks is Python. This will render as Python on Sphinx/RTFD:
Read MoreBy E. W. Dijkstra.
An interesting topic by Anssi Kääriäinen flew by django-developers mailing list about ticket #16649: “Models.save() refactoring: check updated rows to determine action”.
The ticket mentions a 50% performance optimization. Here’s an explanation by akaariai (core developer):
A bit more information about what the approach suggested is about. Assume you load a model from DB, change some fields and save it. We currently do:
SELECT - load from DB [change fields]; save() In save: SELECT - assert that the PK exists in the DB if yes: UPDATE else: INSERTThe second select above is usually redundant. If we know the object is loaded from DB (
Read Moreself._state.adding == False), and we are saving it to the same DB it was loaded from (self._state.db == the db we are saving to), then it is very likely the object exists in the DB. So, instead we should do:
Personnaly, I’ve never thrusted that feature ever. I prefer to remember or regenerate my passwords. Egor Homakov explains how this feature can be exploited in javascript.
… then try ignorance.
This message is intended to motivate developers to document their stuff.