At some point in a game, you regret the turn type you selected hours ago when creating it. Fear not, changing the turn type is easy if you know what to do.
Continue reading “Civilization V: How to change the turn type of a started game”
At some point in a game, you regret the turn type you selected hours ago when creating it. Fear not, changing the turn type is easy if you know what to do.
Continue reading “Civilization V: How to change the turn type of a started game”
Aside the logging library resides the less known warning library. The former is meant to log events related to execution whereas the later is meant to warn more or less about improper module usage or deprecated functions. By default, most warnings are displayed once, meaning that they will not clutter your logs by being shown repeatedly. However, some are “ignored by default”, hence not displayed at all. This is where the important difference with logging is: the control you get over them at the command line level.
Je viens de publier un article sur le blogue de Datacratic à propos d’un outil en source libre de gestion des “Lifecycle” pour les buckets S3.
Accéder à l’article.
Accéder à l’outil.
Have you ever heard or used python counters? They are very useful to count the number of occurrences of “simple” items. Basically:
> from collections import Counter
> colors = ['red', 'blue', 'red', 'green']
> Counter(colors)
Counter({'red': 2, 'blue': 1, 'green': 1})
However, if you try to use it on non hashable types it doesn’t work.
> colors = [['red', 'warm'], ['blue', 'cold'], ['red', 'warm']] > Counter(colors) [...] TypeError: unhashable type: 'list'
What do we do then?
About a month ago I created the streaming node addition functionality within StarCluster. As the time went by, I fixed some of its issues and found it a bit messy and hard to understand so I decided to move it to a separate file. The new version is ready and battle tested.
Another feature that I found to not be working as expected is the handler for nodes having the same alias. I fixed it and made a clean commit easy to pull/cherry-pick. It’s only a matter of calling _recover_duplicate_aliases.
In the core version of StarCluster, when you add many nodes at once (command “addnode -n #”), StarCluster goes through three sequential checks[*] that all nodes need to fulfill in order to move forward and eventually start configuring the nodes within the cluster.
If you add a single node, that’s fine, but if you add 10, you lose some time as the first node might be ready a few minutes before the last node is. That is to say, you are wasting some computing time.
This was a big two weeks for StarCluster as the Datacratic’s version got 3 new features: config on master, multiple subnets support and the dns-suffix option.
Everyone knows about the benefits of having documentation. What is harder to agree on is when is a good time to produce it.
A good development cycle should always have its phase of documenting for the new features and the new behaviors to be expected. But, if it’s not your case, there are two other very good moments for documenting.
Continue reading “When is a good time to document software?”
I want to write about timestamps. Not because it’s a subject I like, but on the contrary, because it’s a subject I somewhat hate. What is a simple day to day thing for humans is a real source of headaches for programmers.
The list of reasons for that is about as long as the number of permutations programming languages allow you to do while parsing dates with a string format. Just to name a few, symbols can change (“-” vs “/”), order can change, years can either be 4 or 2 digits (probably those born post year 2000 aren’t aware we had a major bug back then), 24 hours vs AM/PM and even locales (English “February” vs French «Février»).
You don’t think it’s a problem? To this date, 18 596 questions bear the tag “datetime” on stackoverflow.com. That’s huge! Still to this date, there are 294 443 questions tagged “c++”. So there are about 15.8 times as many questions for a full language, namely c++, as there are for a what should be a trivial subject: datetime.
I just released an update to my chrome extension. Here are the new features.
Somehow, it might not work as the chrome store gives my a somewhat vague warning message.
It reads: This element risks to install incorrectly over Chrome version 33. Please check the package and the manifest and proceed to a new import if necessary.
Well. I guess it won’t work. But it does work for me. So how am I supposed to know what to fix with such a vague message? We’ll see…
EDIT 2014-03-04
It seems that trying to install the new version gives a more decent error message.
Just bad that it doesn’t print that message straight in the developer’s page.