2015-06-07

Thought about python from a rubyist

This weekend there was a python conference here in Taipei (pycon apac). As Gandi was sponsoring it, I went there and tried to figure out how python and ruby communities differ in my local area. As a matter of fact, I also push my python coding skills a bit. I kind of like to nurture a general polyglot approach.

It first seems that the python community is more largely supported by sponsors than ruby one. It’s more mainstream in the general engineering world, I guess. There was google, facebook, microsoft, having a table and talking about their cloud things. But the general setup was pretty similar to the ruby or rails conf I’ve been in.

The topics in this conference were maybe a little more scientific and less web-oriented than we can find in ruby world. Python has tighter bindings with lower level languages. I think it’s not a specificity of the language because you also can build C extensions for ruby. But it’s more a result of the community interests.

I have the feeling that the ruby community dedicated more efforts towards the web front and other rails related principle like testing suites, DSL and meta-programming. But my general feeling is that there is no technical reason for that. It’s just how things happened over time, mostly given the weight of rails in the ruby communities.

Actually, I also had the feeling that pythonists don’t consider ruby as a ‘competitor’. They feel closer to java, node or golang, and at various occasion I had the impression that they consider ruby to be only the language behind rails.

I also thought that the ruby community was special about its adoption of macbook laptops. Even if actually the python coder has more diversity, I evaluate around half macbooks, the rest split between ubuntu and windows. It’s less that in ruby confs where macbooks are kinda 90% and windows users are very few.

Also, I noticed a similar movement about diversity with django girls and pyladies, comparable to the rails girls, which tries to close the gender gap in the engineering world.

Anyways that was good and interesting. Geeks are the same kind, whatever language they use (by trade or by taste). I strongly advise, if you have the occasion, to wander out of your usual communities and join other circles. It gives a good perspective on you usual world.

2015-05-31

linux trick: too many logs

Recently I found my self again in that situation on a linux server. The partition where logs are stored went 100%. In such case, It’s clever top purge old useless logfiles. Typical move for me would be to run logrotate manually with

logrotate -f /etc/logrotate.conf

But I had a case where that was not enough. A developer forgot to remove a debugging output and the logs were just gathering way too much information, more than what I could free with some janitoring.

To avoid losing logs, we can move the logfile where there is space and replace the file with a symbolic link. That’s good enough for until the partition gets resized of the logs get cleaned. But when it’s done on a live logfile, the running process that writes into it still has the same file descriptor. The process has to be relaunched so the new fd can be taken in account, on the new partition, as instructed by the symbolic link.

So a colleague pointed out that could be done without restart by using gdb. It’s a pretty neat trick (if you have gdb installed on your production server, which may not always be the case, and for good reasons). Anyways I had it at hand, and here is the sequence:

touch /path/to/new/logfile

gdb -p pid

(gdb) call dup(1)
$1 = 3
(gdb) call close(1)
$2 = 0
(gdb) call open("/path/to/new/logfile", 2)
$3 = 1
(gdb) call close($1)
$4 = 0
(gdb)

This gave me the taste of digging up a little bit more on how gdb can interact with live processes.

2015-05-24

The side effects of recruitment

Recently I had to look for a new devops for our team. I have been handling technical recruitment at many occasions, and each time I have to explain my colleagues that I have a special process. The fact is, the technical sphere is a small one, we are all linked, more or less, to a community. Well, in my case, I always have had to recruit people in companies that were hiring the kind of people that commit on github, have some kind of community activity, at least. I guess that in huge companies where people are just a set of checkboxes, things go a bit differently.

But anyways, in my case, and probably in the case of all recruiters in modern and small businesses, it’s not all about checkboxes and profiles. It’s about personality, compatibility, and mindset. So when I first get a contact with a candidate, I invite him (or much more rarely, her), to a chat online, preferably on irc or whatever real-time discussion media is more fit (for a linux geek, if you can’t go on irc, then there is a problem).

I noticed that during my past sessions of recruitment, I established contacts with very interesting people. By having an unformal discussion online, just chit-chating of what work we do and what we did before, it’s kind of easy to get an idea of what is the kind of relationship you will have with your potential future colleague. But beyond that, it’s all about making things personal. We are all unique. It cannot be computed, scripted, engineered in a way that non-technical people would be successful conducting that process. It takes a geek to recognize another geek.

At Gandi of course we have a HR person. But she usually appears at the very end of the process and not at the beginning. The peers are going to evaluate candidates, make their mind to see if they want to spend days and days collaborating with them. It matches with my way to do things, fortunately. If I have any doubt of the technical abilities on someone, I don’t do stupid technical tests, I try to find other people that know the candidate and get third party feedback. If not, then I try to use a meetup in a community related to the speciality in question, so we can discuss and be around other people where some tangent discussion can happen.

At the end, if all goes well, then the candidate is going to enter the more formal whatever the company uses as a recruitment flow. But that’s merely a formality. And after 20 years building up teams and recruiting people, I can affirm that instinct always wins, in my case. If I smell anything fishy in an unformal context, there is going to be problems. Well, the process is never perfect, it also can smell ok but stink after 3 months, too.

But the thing is that having those chats online with peers is pretty interesting. I learn a lot about how other companies work, how they handle their management, what kind of work conditions they have. Just because it’s part of the contact process. So I’m not really in hurry to make a final decision because, to be honest, I just enjoy those contacts.

It certainly takes some time, I can’t be in constant recruitment, but from time to time, it’s very valuable. And not only for the effect of recruiting someone. It creates bonds with the industry, with people, with communities.

2015-05-17

Noobs rule the planet

There is something that I always did in my career managing internet tools. I volunteer helping non-technical people to get a presence online, build up communities and such things. But I have to confess, this comes with a price. A price on your nerves when you realize that easy obvious things that you take for granted are actually not clear at all by the average Joe.

Yeah sure they can post of facebook. For many of them, it’s pretty much all what internet means. But for the real things, they have no clue what they are doing. Talk about the merits of a chaos money to test your infrastructure. Well, the man on the street is pretty much the best you can get when it comes to chaos testing your design and workflow.

But whatever infuriating it can be, it’s a great thing to keep in mind. People have no clue what they are doing. They don’t know what an url is. They think smileys are fun. They feel writing all in capitals is just a detail. When some popup appears they consider it’s all broken and there is no need to read what’s written on it because anyways that’s over their heads.

So, when you design your applications, you may be lucky enough to face an educated population. But in many cases, you may not. Take it in account. Make things over-explicit and use images to bypass the inability of the modern average people to read anything that is more than a sentence of 5 words.

Go volunteer to help your fellow neighbors in your local non-tech communities. It’s hard, but it helps keep in touch with the reality.

And above all, keep patience. It’s not their fault. There has never been any economical incentive to educate users. The shortest path is always the best path. So for sure, you should make things easy. But if you get any occasion to provide your users some education, it’s never going to be on your spec sheets. You can do it as a natural thing to do. Add optional text to explain why things are the way they are. Few will read it, but they will learn from it.

2015-05-10

Greenruby Better process and numbers

That’s a few weeks now that we are getting organized better, with Xenor and Tysliu, on the preparation of this newsletter. The guys are now putting more attention to the news gathering and preformatting the yaml source file that I use to generate the letter and the website. After some time of practice, it is much better for me, as now I don’t spend 5 hours each sunday anymore and I can manage the publication process in less than 2 hours. I still gather some extra links after the editors push their contributions. Then I verify the links, the categories, edit the comments sometimes, add dots at the ends of line, such tiny things. A huge thanks to Xenor and Tysliu!

Now we have 1312 subscribers to the newsletter. Plus an unknown number of RSS subscribers, maybe around 200. We get 250 visits per day on the website (according to webalizer), and most of them come from rss readers of many sorts. As the mailchimp is still free until we reach 2000, there is some margin. When we reach 1600 I think I swill begin a cleaning campaign, to help people that actually don’t read the letter to unsubscribe. I kind of like the idea of throwing accounts away. Usually in web business, an account is an asset and they are never thrown away. There is so much to be told about numbers, and their reality, in our industry.

But the reality about numbers is usually the consequence of the over simplification required by marketeers. Things are never so simple as just a single number. The technicians among us are always in pain when we need to provide numbers, because they come with a strict definition of what they count, and that definition is never respected by the people that just want to use the number and put a sexy label on it. When we say ‘registered accounts’ they say ‘users’. Do you see the difference? Damn, I hate that system that forces salesmen to become a liars.

2015-05-03

RFID world

They begin to appear everywhere. I saw mine first on my passport, then I just got my new credit card and it has one in it. Those things are nice if you consider them naively. But the fact is that they are flawed and insecure. We carry around more and more of those items that can be read at a proximity by specially crafter devices. Gosh, did they not learn already from the ingenuity of our kids?

There have been myths in science fiction about human implanted with chips. Well, our phones for a while have been providing the same features. Call me paranoid, but I just don’t like the feeling. And I also don’t like not having any choice about it. Hopefully we can still disable the credit cards RFID, craft some pockets to put our passport in it, or buy some faraday pockets.

If you pay attention, you can find or hear about phone apps called ‘electronic pickpocket apps’. This choice of a name if so relevant to the situation. Note that NFC, included in more and more phones, is a subcategory of RFID, operates in much smaller range (10 cm). But basic RFID tags can be detected beyond 100 meters with proper antennas.

We talk about the Internet of Things. Sounds sexy. But clearly, we only are one of the Things of that Internet. Without any implant, just by carrying around passport and credit cards. Or by working at a company that uses that technology for staff monitoring. I don’t know about you, but for me, it’s scary as hell.

2015-04-26

Welcome Jessie

Ok, right. Maybe you don’t care, but this saturday Jessie was officially released. It’s the next stable version of debian, version 8.0, and it’s great that it finally got out. Debian release cycles are certainly not as fast as Ubuntu, but the stuff in there is more stable. And well, in my personal case, I work in a place where everything is in debian wheezy and can now finally get upgraded.

Actually I have been using Ubuntu on my desktop for some time. The reason was that I wanted to be able to help people to transition to linux, without being overloaded with support. So I had to know how ubuntu work. But last year I switched back to the original debian and I have been pretty happy about that. There is less cruft and opinionated choices (no freaking unity as a default window manager). And it’s pretty straightfoward in the install process. I suspect even non-techies could give it a try (I know some that did).

2015-04-19

State surveillance in France

What happened this week in France is quite shocking. How can they be so long to make useful laws and so quick to pass harmful ones? Well the move began in December last year. Some call it a French Patriot act. This is not the first time there is an attempt from French government to enforce stronger control on the internet. The pressure of lobbies and media industries have been pushing hard to preserve their interests.

But this time, it’s just about copying the NSA, and get legal requirement for service providers to host the black boxes. Seems that the Snowden revelations gave the lawmakers some ideas. The impact is not anecdotal in the French society. Some service providers announce they will leave the country like Altern (French), others call to action (French). Both Valentin and Laurent are long time activists in the French landscape. I know them for a while. Funny how things turn out, I’m now working in the company they founded in 99 (and passed hands in 2005).

But all this makes me think that we are facing a technicality. The real thing is systemic. It seems that we failed, as a civilization, to regain control over our systems. The course of evolution is going to lead to more control to the machines, more dependence on the computerized information. Up to a point where our insignificance as human being will become really obvious.

We, as small makers of this computerized universe, should have some part of responsibility. Is there a way that we can bend the course of history by the small choices we make? Can we not take decisions in regard of how to implement solutions, in a way that we can preserve a margin of freedom and respect for the human species? I’m not sure, at this point, there is anything we can do. But if we don’t try, we will never know. Think about it. You build systems. You shape the world. Your choice matters.

2015-04-05

Multiple inheritance simulation

This is a bit twisted. In ruby, as you know, you cannot use multiple inheritance. But the flexibility of the language, especially the metaprogramming aspect, opens the door for some cheating. Check out this code, it tricks it by declaring the first class as the super class and the remaining classes as modules included in that super class. Pretty acrobatic and elegant, imho.

About vaping

Well this has been my burden for 30 years, and I’m not proud of it. But last week it finally ended. I quit smoking. But this was kindof a trick, as it was made possible by switching to vaping. It certainly doesn’t solve the nicotine addiction issue, but I’m very happy with this move and hopeful for a gradual freedom.

I also found out that this vaping practice is very geeky. The hardware part is quite elaborate, vaping devices are really neat piece of work, there are a bunch of vendors. The liquidware is also quite a subject of hacking. Technically it’s not that hard to do it yourself. Not surprising that I discovered this vaping practice in geeks circles.

2015-03-29

Green Ruby New Generation

We had this week a very productive meeting with xenor and tysliu in our preferred coffee shop. I explained more in detail my workflow and my quality criterias. So now they can feed the links section and become the major editors of Green Ruby. I Still keep the role of the publisher. I get their links, I clean up stuff, verify freshness and reachability, remove superlatives, fix category if needed.

Special thanks a lot to Xenor and Tysliu (aka. Simon). Now they do the heavy lifting and they are the reason why Green Ruby is still in your mailbox every week.