<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Jean-François Cauche on Medium]]></title>
        <description><![CDATA[Stories by Jean-François Cauche on Medium]]></description>
        <link>https://medium.com/@jfcauche?source=rss-593cc9b943a7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*OV2sfB7idM9SGjYXAheIOg.jpeg</url>
            <title>Stories by Jean-François Cauche on Medium</title>
            <link>https://medium.com/@jfcauche?source=rss-593cc9b943a7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 03:13:16 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jfcauche/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Show them the basics, Luke, just the basics  — 4 tips to create goo examples]]></title>
            <link>https://medium.com/@jfcauche/show-them-the-basics-luke-just-the-basics-4-tips-to-create-goo-examples-4e7ad03728b2?source=rss-593cc9b943a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/4e7ad03728b2</guid>
            <category><![CDATA[kids]]></category>
            <category><![CDATA[pedagogy]]></category>
            <category><![CDATA[code]]></category>
            <category><![CDATA[microbit]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Jean-François Cauche]]></dc:creator>
            <pubDate>Fri, 15 Feb 2019 09:17:19 GMT</pubDate>
            <atom:updated>2019-02-15T09:18:16.510Z</atom:updated>
            <content:encoded><![CDATA[<h3>Show them the basics, Luke, just the basics — 4 tips to create good examples</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jmlisHA0jvwa9R_FnWdnPw.jpeg" /></figure><p>As I teach code and other digital technologies to children and teenagers, I am regularly confronted with the need to develop clear, easy-to-understand examples that can be quickly invested in the learner’s projects. This is not always easy. However, a few simple rules make it possible to reach the goal. Too often, when I search the web for resources, I waste a lot of time going from page to page to find a basic example of what I want to do. These peregrinations have allowed me to identify some rules that I try to respect systematically.</p><p><strong>1 — Good : Show the final result before starting the explanations</strong></p><p>Imagine a hike, a winding path, not necessarily easy to follow. Imagine that a guide accompanies you. The only problem is that you don’t know where you’re going and you can only trust him. You’re moving forward step by step without really knowing why.<br>This is the problem with most tutorials. The title gives you a first idea of what is proposed but sometimes it is a little vague and it would be much more practical before getting to the heart of the matter to show the result clearly. I very often realize this looking at musical tutorials. Sometimes it takes the twentieth minute to hear the final result, which maybe does not correspond to what I want to do. Placed at the beginning of the video, the example would have been a valuable indicator.</p><p><strong>2 — Bad : Limit yourself to a single example without its minimum refinements</strong></p><p>I recently let the students do their own research on how to realize for the Micro:bit a loop in micropython. I didn’t think this would be that complicated. All of them found the same method, namely:</p><p><em>for i in range(0,5):<br> …</em></p><p>And that’s all!<br>First problem encountered: “i” being used in all the examples, all believed that it was the only possible usable variable. No “for x in range (0.5)” for example… The accuracy would have been useful.<br>Second problem encountered: we want to go from 2 in 2 from 0 to 100 and not 1 in 1. The number of pages detailing the correct syntax to use and appearing in the first results of the search engine — yes, younger people tend to be satisfied with the first pages — was quite small.</p><p><em>for x in range(0, 100, 2):<br> …</em></p><p>The last problem we encountered was that we seemed to be in a only growing world. This time, it was through experimentation that they discovered that a decreasing loop could be used.</p><p><em>for x in range(10, 0, -1):<br> …</em></p><p>Or even:</p><p><em>for x in range(10, -10, -1):<br> …</em></p><p>The same problem was encountered with Scratch where the search for a script to draw a circle always referred to the same result: a very simple script that made it possible to make a circle but always the same circle and without being able to change its size, even on pages of “professional” tutorial authors.<br>This may seem surprising. Indeed, we can and we still have the right to test, to try until we find the right syntax, but switching from one syntax to another is not always natural for children and many do not dare. Personally, my skills in code would have helped me to guess the necessary syntax, but this already requires learning one or more languages.</p><p><strong>3 — Good: Do not only show your skills / think about the user</strong></p><p>It is sometimes tempting to give in to the “demo” effect, to the desire to show your skills in a tutorial. Why settle for a simple “hello world” when I can display it in mosaic and in all the rainbow colours. True, but your reader only wants one thing at this stage: to display “hello world” on the screen. The other embellishments assume knowledge that he does not yet possess and that may distort his understanding of the only command that interests him.<br>For example, I remember a tutorial for micro:bit where after a few basic commands of the initial language the author moved directly to another much more complex one requiring the installation of specific libraries. For an introduction aimed at younger children, the effect was rather unsuccessful. It is not uninteresting or impossible to show complex things. It is even recommended but there is a time for that and it is not when the learner starts.</p><p><strong>4 —Good : Creativity and use</strong></p><p>Finally, the question “what’s the point?” must be answered by this time addressing complexity in a creative way. If a simple “hello world” in Python makes it possible to understand the syntax of the “print” command, what can we do with it that goes beyond the simple fact of displaying text on the screen?</p><p>So be creative. Once the learner has a good comprehension of syntax, we can develop more complex projects that are fun, scientific, artistic… Think of a foreign language. It takes a little time and syntax before you can write a short story or poetry, but this last step helps to develop language learning in a highly creative environment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4e7ad03728b2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Small praise for pedestrian and mental vagrancy]]></title>
            <link>https://medium.com/@jfcauche/small-praise-for-pedestrian-and-mental-vagrancy-28a1bbec92ee?source=rss-593cc9b943a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/28a1bbec92ee</guid>
            <category><![CDATA[wanderlust]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[mental-health]]></category>
            <category><![CDATA[life-hacking]]></category>
            <category><![CDATA[lifehacks]]></category>
            <dc:creator><![CDATA[Jean-François Cauche]]></dc:creator>
            <pubDate>Sat, 24 Nov 2018 08:05:56 GMT</pubDate>
            <atom:updated>2018-11-24T08:05:56.348Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c7_z4A9N5jjUo-w98GXoew.jpeg" /></figure><p>We are told very often that we need to be physically active, for example walking (at least 30 minutes a day) but no one ever uses the term “wanderer”. It is perceived as pejorative. Moreover, the results of queries on different search engines associate it with other terms such as “mad”, “miserable”… This does not encourage interest.</p><p>Yet it’s one of my major flaws — in today’s society — and I must not allow an unexplored path, a welcoming riverside, an abandoned and mysterious door to linger in my visual space. This morning I just dropped my car off at the garage for a roadworthiness test and I faced two possibilities: either sit in the waiting room or drive 100m to reach a small path along a river and meadows. Anyway, wandering. I remember full days wandering in the countryside or in cities like Brussels or Paris. No specific purpose. I remember congresses, meetings, salons where most of people rushed to the coffee machine while I plunged into the shallows that surrounded the premises (in suits and ties, it should be noted :-) ).</p><p>Wandering means going out of the frame, sometimes approaching places with little traffic, confronting spaces where pedestrians have no place, or even where marginal populations have been relegated.</p><p>Dangerous? In more than 20 years of vagrancy, I have never been worried, and if so it was only a trick of my imagination. All you have to do is to take a few precautions: look where you are crossing, take your time, don’t go into a building that seems to be in a too bad state, be open and friendly.</p><p>The danger is not there, but in the eyes of others who most often consider these walks as eccentricities. I remember a return from a meeting (when I was still an employee) where everyone rushed into their car while your servant was walking about two miles. This led to a total misunderstanding and some admonitions.</p><p>In our society, it’s a question of running, of optimizing one’s time. If you have time to waste, you should hand it over. Even if you only use it for a hobby, it makes you look important. It’s more rewarding than wandering randomly, walking. It seems in the social hierarchy that walking is good for others, those who have no ambition.</p><p>However, I am not saying that we are not allowed to walk. But in society, there are well-defined times for this. Apparently there is a law that says “you will only go for a walk during the holidays or weekends”. Weekdays are taboo because we work. If you break this rule, you’re considered a lazy person.</p><p>In short, let’s optimize our time. But is it really effective?</p><p>On these two miles on foot — a leisure activity according to my hierarchy at the time — I had plenty of time to think about the comments exchanged during the meeting. My brain was free to think, analyze and build a project. At the end of my walk, everything was tied up in my head and all I had to do was to use my keyboard, my digital pen, to share my vision with my colleagues. Curiously, the fact that my proposal was one week earlier than the others’ was not considered. I had wandered… I was guilty and I stayed guilty.</p><p>Sometimes in my work, people are surprised that I let children play in the workshop? “What? What? They don’t do the activity. Do they play?”</p><p>Indeed, either they need a little mental vagrancy, or it is a reward for completing the work required, or finally the game is part of the experience and is associated with a challenge.</p><p>I apply the same philosophy as for pedestrian vagrancy. It is not the ability to sit in front of a desk that will save anyone; it is curiosity, the ability to use one’s skills, to mix them up, to extract all the small details necessary for the project to build a new knowledge.</p><p>Children need it as much as adults.</p><p>Recently I was playing Contra, an old video game that rocked my youth. I played it so much and more on Amstrad CPC. Anyone who sees me playing could think that I’m not working, that I’m having fun. If they were asked if they wanted to hire me, I think the answer would be “no”. Society needs people it believes productive, not strollers like me. In school, in my youth, I would have paid myself a remark or even a fine punishment. Except that I was stuck at that very moment, stuck on a piece of code and a way to present things in an email. Stuck on a term that didn’t come up. So I did as I have always done: I let my mind wander. Fifteen minutes later, the solution was obvious. If I had stayed in front of my code or this email, nothing would have come. And yet this is often what is imposed. The “cigarette and coffee” break is accepted at work. However, try to take a break from “video games” or “walks”. We all know what happy words you will be given.</p><p>However, aim for efficiency. In education, children need to be stimulated, to breathe. So it doesn’t matter if they look like they’re doing nothing. If you have put them on track, if you help them manage these breaks to become creative and productive moments, it will only be beneficial.</p><p>Try it for yourself. Where to find the time? I can’t find it, I’ll take it or rather I’ll insert it. Explore your surroundings. Just never forget to carry a notebook and pencil (or a note-taking application). Never forget…</p><p>(This article was written on mobile in 10 minutes in front of a river, a weeping willow, 3 ducks and 2 water hens. Reviewed, validated and posted with 5 minutes of Castlevania in between.)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=28a1bbec92ee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[12 tips and tricks to learn how to code (because 10 was too short)]]></title>
            <link>https://medium.com/@jfcauche/12-tips-and-tricks-to-learn-how-to-code-because-10-was-too-short-f4d643082138?source=rss-593cc9b943a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/f4d643082138</guid>
            <category><![CDATA[learning-to-code]]></category>
            <category><![CDATA[code]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[lifehacks]]></category>
            <dc:creator><![CDATA[Jean-François Cauche]]></dc:creator>
            <pubDate>Sat, 24 Nov 2018 07:38:23 GMT</pubDate>
            <atom:updated>2018-11-24T07:38:23.263Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gCHQ3oITv2p16ELkBCfwdw.jpeg" /></figure><p><strong>1 — Learn the language you like, not the one that is the hype of the moment</strong></p><p>That’s the golden rule: learn while having fun or at least like what you’re doing. Don’t focus on the language of the moment. If it turns you off, you won’t get anywhere. Moreover, this field is evolving so fast. Javascript, for example, was particularly discredited before HTML5 was mentioned and became one of the pillars of the web. The important thing is that the language you choose stimulates your curiosity and your desire to learn. It is also more interesting to have developers with multiple facets than exactly similar profiles. What’s more, you will always find a solution to achieve your goals. For example, the PHP — MySQL couple has always put me off in the database business. This didn’t stop me from overcoming it by having fun with languages and meta-languages like Rebol (now Red), Python and XML.</p><p><strong>2 — Find a project that you are passionate about and carry it out successfully</strong></p><p>The major defect of some manuals or code training is the lack of concrete cases. You are taught the commands one after one but the binder is almost absent. It’s like learning words, sentences without ever having a conversation. For example I got a slap in the face the first time I really came to England for a while. Nothing to do with the school’s English. Fortunately, it didn’t take me long to adapt and immerse myself in the great linguistic bath. The big goal is therefore a project that fascinates you, for which you will find the time and energy to think, to develop, to perhaps and surely break your teeth. It doesn’t matter if this type of software already exists. It’s always more interesting to do it yourself. Respond to a need, a desire. For example, build a tool to complement another of your passions. Be creative.</p><p><strong>3 — De-dramatizing</strong></p><p>You are learning a new language. Imagine yourself in a foreign country where you only know a few words and where the computer is your only interlocutor. You ask him for the salt. He answers you that he doesn’t understand. You ask him again in a different way. He brings you the sugar. Nothing serious. Just a problem of understanding. Your life is not at stake at this moment and the computer will not cross out your digital copy with a large red pencil line or explode after displaying a large flashing “syntax error”.</p><p><strong>4 — Step by step and do a little every day</strong></p><p>10 minutes a day or 5 hours every fortnight won’t make you a developer. It’s better to learn and practice a little every day. Good regularity makes it easier for you to memorize. Don’t aim too high from the start either. You could be disappointed. In the field of computer programming, it’s easy to imagine becoming bilingual overnight. This requires a little more patience but your efforts will always be rewarded.</p><p><strong>5 — Knowing how to pause</strong></p><p>Sometimes it is necessary to know how to temporarily abandon what you are doing in order to return to it better. Being stuck in front of the computer won’t bring you inspiration. You will be even more lost. When I don’t understand anything anymore, I walk very often away from the computer, take a sheet of paper and try to express my thoughts in a simple way. This allows me to see more clearly and to find the place where I got lost in the code. Feel free to move on to something else, something completely different. The solution of a piece of code that tortured my mind has recently appeared to me while shopping, a pack of noodles in my hand… When you detach yourself from an activity, you release the brain, which can then “unknowingly” explore multiple alternative paths. Move, walk, ventilate your mind, relax in front of a good book, comic book or video game and there is a good chance that everything will be clear and that you will express yourself “Damn it, that’s of course!”.</p><p><strong>6 — Comment, synthesize</strong></p><p>Commenting on the code quickly becomes essential. On one hand, to explain what you are doing (especially important when you are just starting out), and on the other hand, as a reminder. When you jump from one project to another or pick up a piece of code six months later, it’s important to be able to find your way around quickly. It would be a shame to waste time wondering how the program works. Similarly, it may happen to you for x reasons not to code naturally but to use a subterfuge, a backdoor. Six months later, you will most likely wonder why you didn’t code this or that function in the traditional way. What you will do immediately before you realize your mistake and the “why the how” that you acted differently.</p><p><strong>7 — Take notes and synthesize your knowledge</strong></p><p>Paper or digital textbooks, online courses are very practical but do not necessarily correspond to your way of learning. Moreover, the explanations are sometimes verbose and you are only interested in a small piece of text, such as the syntax of a command. Make yourself a summary document, why not in the form of a mind map. When you are missing information, you don’t need to dive into the manual. A simple glance at your synthesis will allow you to find the important information. It also allows you to fill in the missing information or give examples that seem clearer to you than in the manual.</p><p><strong>8 — Test and experiment</strong></p><p>Manuals do not always have the answer to everything and sometimes the problem you encounter is not documented. I often take the example of the labyrinth in training. You don’t get stuck at the end of an alley. You retrace your steps to test the next path until you find the exit. In the code, the same is true. If it doesn’t work with method A, maybe method B will be the right one, or method C or method D or method E… You don’t lose anything to try. Sometimes it is even better to isolate a command, test it outside your program to check that you have understood how it works and that it meets your needs exactly.</p><p>Recently, for example, I was looking at a command in a manual to delete a specific character from a string, such as removing commas from a sentence. However, I wanted to remove all the punctuation and the manual did not indicate how to remove several characters at the same time. I could have repeated the same command character by character but it seemed a little tedious to me. I simply added other characters between the quotation marks indicating the one to be deleted and the miracle was. I could have wasted my time searching the Internet or got stuck. A simple test allowed me to move forward.</p><p><strong>9 — Back up regularly and use versioning</strong></p><p>Regular backup should be a natural reflex. No one is immune to technical problems or handling errors. And goodbye the code typed for long feverish minutes… Save regularly and do not hesitate to create multiple files each with a version number. This allows you to keep a history of your progress and to identify errors more easily. If version 0.43 of your code worked perfectly, there is no doubt that the errors are due to what you added to version 0.44.</p><p>By convention, versions with decimal places are referred to as “minor”, i.e. the changes made to them are not significant. Versions with a whole number are called major because they are considered functional and bring a real innovation in the progression. If I compare it with hiking, versions 0.43 and 0.76 indicate that you are making progress on the way, version 1.0 indicates that you have reached your first stop, the refuge of the Singing Owl on Big Thunder Mountain. Version 1.0 is a little special because it is the first truly functional version.</p><p>For example, I am currently coding a text analyzer in Red for fun and I am at version 0.56, which means that my program is running correctly but it is not yet functional enough for the public and that there are still major improvements to be made.</p><p>You can use online services like Git (and Framagitfor french readers) to save your code and be able to track the history more easily, but to get started, it may not be necessary.</p><p><strong>10 — Simplify, optimize your code</strong></p><p>Your code works perfectly? Beautiful! Beautiful! But the work is not finished. It is time to simplify and optimize the program. Simplify by checking if there is no possibility of having a more concise code or using faster methods. For example, some orders can be combined into one. Simplified and optimized code is more elegant, easier to read and, above all, works faster. This means less machine time used, less energy consumption.</p><p>Optimizing, gaining in speed and resources also means caring about older equipment. What is the point of your program if you always need the latest computer to run it? Users are more likely to turn to economical solutions and your concern for optimization will show your skill and seriousness in the code.</p><p>Optimizing also means caring about the user and possible errors. We then try to put ourselves in the latter’s shoes and list the problems he or she may encounter. Feel free to test your program with others. When you have your nose in the handlebars, it is often difficult to spot your mistakes.</p><p>An example of an error? Many online forms review the entry during typing and display an error message in red a little too systematically. When you enter an email address and see the message “invalid email address” appear, you may have questions. In fact, as long as the entire address is not typed, it is necessarily invalid. An informed user will know what it is all about. Others will be blocked. The simple solution is to check the entry when the user validates the form and not when typing. Design error, error of developers who have not put themselves in the user’s shoes….</p><p><strong>11 — Compare, examine the code of others</strong></p><p>We learn by observing. To observe is not to copy, to take back bits of code without really knowing what it is for. To observe is to examine, analyze, try to understand the method of this or that developer and then find its own method. Whenever possible, feel free to look at the work of others and come up with your own solutions.</p><p><strong>12 — Asking questions</strong></p><p>There are specialized forums, sites full of articles. The problem you are working on may not find its answer immediately, but chances are you are not the only one in your case or another problem is approaching it. After doing some research, documenting your problem, feel free to ask the question on a forum not without clearly explaining the situation that is blocking you. A “It doesn’t work” never solves anything.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f4d643082138" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[12 trucs et astuces pour apprendre à coder (parce que 10 c’était trop court)]]></title>
            <link>https://medium.com/@jfcauche/12-trucs-et-astuces-pour-apprendre-%C3%A0-coder-parce-que-10-c%C3%A9tait-trop-court-917df3879652?source=rss-593cc9b943a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/917df3879652</guid>
            <category><![CDATA[learning-to-code]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[code]]></category>
            <category><![CDATA[scratch-programming]]></category>
            <dc:creator><![CDATA[Jean-François Cauche]]></dc:creator>
            <pubDate>Tue, 09 Oct 2018 08:47:54 GMT</pubDate>
            <atom:updated>2018-11-15T17:05:28.741Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QkDbxJWr7p3HEsWV8_bdLA.jpeg" /></figure><p><strong>1 — Prendre le langage qui vous branche, pas celui qui est la hype du moment</strong></p><p>C’est la règle d’or : apprendre en s’amusant ou tout au moins aimer ce que l’on fait. Ne vous focalisez pas sur le langage du moment. S’il vous rebute, vous n’arriverez à rien. De plus, ce domaine évolue tellement vite que vous n’êtes pas à une surprise près. Le Javascript était par exemple particulièrement déconsidéré avant que l’on parle de HTML5 et qu’il devienne l’un des piliers du web. L’important est que le langage que vous choisissez attise votre curiosité et votre envie d’apprendre. Il est plus intéressant d’avoir des développeurs avec de multiples facettes que des profils tous exactement similaires. Qui plus est, vous trouverez toujours une solution pour aboutir à vos fins. Par exemple, le couple PHP — MySQL m’a toujours rebuté dans le domaine des bases de données. Cela ne m’a pas empêché d’y pallier en m’éclatant avec des langages et méta-langages comme Rebol (désormais Red), Python et XML.</p><p><strong>2 — Trouver un projet qui vous passionne et le mener à bien</strong></p><p>Le grand défaut de certains manuels ou formations au code est le manque de cas concrets. On vous apprend les commandes les unes après les autres mais le liant est quasi-absent. C’est comme apprendre des mots, des phrases sans jamais avoir de conversation. Je me suis ainsi pris une claque la première fois que je suis venu passer véritablement quelques temps en Angleterre. Rien à voir avec l’anglais de l’école. Il m’a heureusement fallu peu de temps pour m’adapter et plonger dans le grand bain linguistique. Le grand bain, c’est donc un projet qui vous passionne, pour lequel vous trouverez le temps et l’énergie de réfléchir, de développer, de vous casser peut-être et même sûrement les dents. Peu importe si ce type de logiciel existe déjà. C’est toujours plus intéressant de le faire soi-même. Répondez à un besoin, une envie. Construisez par exemple un outil pour compléter une autre de vos passions. Soyez créatifs et créateurs.</p><p><strong>3 — Dédramatiser</strong></p><p>Vous apprenez une nouvelle langue. Imaginez-vous dans un pays étranger où vous ne maîtrisez que quelques mots et où l’ordinateur est votre seul interlocuteur. Vous lui demandez le sel. Il vous répond qu’il ne comprend pas. Vous lui demandez de nouveau autrement. Il vous apporte le sucre. Rien de grave. Juste un problème de compréhension. Votre vie ne se joue pas à cet instant et l’ordinateur ne va pas barrer votre copie numérique d’un grand trait de crayon rouge ni exploser après avoir affiché un grand « syntax error » clignotant.</p><p><strong>4 — Avancer pas à pas et en faire un peu tous les jours</strong></p><p>Ce n’est pas 10 minutes par jour ou 5 heures tous les quinze jours qui feront de vous un développeur. Il vaut mieux apprendre et s’exercer un peu tous les jours. Une bonne régularité vous permet de mémoriser plus facilement. Ne visez pas non plus trop haut dès le départ. Vous risqueriez de déchanter. Dans le domaine de la programmation informatique, on s’imagine facilement devenir bilingue du jour au lendemain. Cela nécessite un peu plus de patience mais vos efforts seront toujours récompensés.</p><p><strong>5 — Savoir lâcher du lest</strong></p><p>Il faut parfois savoir abandonner provisoirement ce que l’on fait pour mieux y revenir. Ce n’est pas en restant bloqué devant l’ordinateur que l’inspiration vous viendra. Il est même fort probable que vous serez encore plus perdu. Quand je ne comprends plus rien, très souvent je m’éloigne de l’ordinateur, prends une feuille de papier et essaie d’exprimer ma pensée de manière simple. Cela me permet d’y voir plus clair et de repérer l’endroit où je me suis égaré dans le code. N’hésitez pas à passer à autre chose, carrément autre chose. La solution d’un bout de code qui me torturait l’esprit m’est apparue récemment en faisant mes courses, un paquet de nouilles à la main… Lorsque l’on se détache d’une activité, on libère le cerveau qui peut alors « à l’insu de notre plein gré » explorer de multiples voies alternatives. Bougez, marchez, aérez-vous l’esprit, détendez-vous devant un bon livre, une BD ou un jeu vidéo et il y a de fortes chances que tout s’éclaire et que vous vous écriiez tel le commissaire Bougret de Rubrique à Brac « Bon sang mais c’est bien sûr ! ».</p><p><strong>6 — Commenter, synthétiser</strong></p><p>Commenter le code s’avère vite indispensable. D’une part, pour expliquer ce que vous faîtes (particulièrement important quand on débute), d’autre part, comme aide-mémoire. Quand on saute d’un projet à un autre ou que l’on reprend un bout de code six mois plus tard, il est important de pouvoir s’y retrouver rapidement. Ce serait dommage de perdre du temps à s’interroger sur le fonctionnement du programme. De même, il peut vous arriver pour x raisons de ne pas coder de manière naturelle mais d’user d’un subterfuge, d’une porte dérobée. Six mois plus tard, il est fort probable que vous vous demanderez pourquoi vous n’avez pas codé telle ou telle fonction de manière classique. Ce que vous ferez immédiatement avant de vous rendre compte de votre erreur et du « pourquoi du comment » que vous avez agi différemment.</p><p><strong>7 — Prendre des notes et synthétiser ses connaissances</strong></p><p>Les manuels papier ou numérique, les cours en ligne sont très pratiques mais ne correspondent pas forcément à votre manière d’apprendre. Qui plus est, les explications sont parfois verbeuses et vous ne vous intéressez qu’à un petit bout de texte, à la syntaxe d’une commande par exemple. Faites-vous un document récapitulatif, pourquoi pas sous forme de carte heuristique. Lorsque l’information vous manque, pas besoin de devoir plonger dans le manuel. Un simple coup d’oeil sur votre synthèse vous permettra de retrouver l’information importante. Cela vous permet aussi de compléter l’information manquante ou de donner des exemples qui vous paraissent plus clairs que dans le manuel.</p><p><strong>8 — Tester et expérimenter</strong></p><p>Les manuels n’ont pas toujours réponse à tout et il se peut fort bien que le problème que vous rencontrez ne soit pas documenté. Je prends souvent en formation l’exemple du labyrinthe. On ne reste pas coincé au bout d’une allée. On revient sur ses pas pour tester la suivante jusqu’à ce que l’on trouve la sortie. Dans le code, idem. Si cela ne marche pas avec la méthode A, peut-être que la méthode B sera la bonne, ou la C ou la D ou la E… Vous ne perdez rien à essayer. Parfois même il vaut mieux isoler une commande, la tester en dehors de votre programme pour vérifier que vous avez bien compris son fonctionnement et qu’elle répond exactement à vos besoins.</p><p>Récemment par exemple, j’examinais dans un manuel une commande permettant de supprimer un caractère précis d’une chaîne de caractères, par exemple retirer les virgules d’une phrase. Je voulais cependant retirer toute la ponctuation et le manuel n’indiquait pas comment retirer plusieurs caractères en même temps. J’aurais pu répéter la même commande caractère par caractère mais cela me paraissait un peu fastidieux. J’ai simplement ajouté d’autres caractères entre les guillemets indiquant celui à supprimer et le miracle fût. J’aurais pu perdre mon temps à chercher sur internet ou rester bloqué. Un simple test m’a permis d’avancer.</p><p><strong>9 — Sauvegarder régulièrement et utiliser le versioning</strong></p><p>Sauvegarder régulièrement devrait être un réflexe naturel. Personne n’est à l’abri d’un souci technique ou d’une erreur de manipulation. Et zou, adieu le code tapé pendant de longues minutes fiévreuses… Sauvegardez régulièrement et n’hésitez pas à créer de multiples fichiers portant chacun un numéro de version. Cela vous permet de conserver un historique de votre progression et de repérer plus facilement les erreurs. Si la version 0.43 de votre code fonctionnait parfaitement, nul doute que les erreurs proviennent de ce que vous avez ajouté à la version 0.44.</p><p>Par convention, les versions comportant des chiffres après la virgule sont dites « mineures », c’est-à-dire que les modifications qui y ont été apportées ne sont pas importantes. Les versions avec un chiffre entier sont dites majeures car elles sont considérées comme fonctionnelles et apportant une réelle innovation dans la progression. Si je comparais avec la randonnée, les versions 0.43 et 0.76 indiquent que vous avancez sur le chemin, la version 1.0 que vous êtes arrivés à votre première étape, le refuge de la Chouette chantante sur le Mont Técarlo. La version 1.0 est un peu particulière car c’est la première version véritablement fonctionnelle.</p><p>Par exemple, je code actuellement pour le plaisir un analyseur de textes en Red et je suis à la version 0.56, ce qui signifie que mon programme tourne correctement mais qu’il est pas encore assez fonctionnel pour le public et qu’il reste des améliorations majeures à y apporter.</p><p>On peut utiliser des services en ligne comme Framagit pour sauvegarder son code et pouvoir suivre plus facilement l’historique mais, pour démarrer, ce n’est pas forcément nécessaire.</p><p><strong>10 — Simplifier, optimiser votre code</strong></p><p>Votre code fonctionne parfaitement ? Magnifique ! Mais le travail n’est pas fini. C’est le moment de simplifier, d’optimiser le programme. Simplifier en vérifiant s’il n’y a pas possibilité d’avoir un code plus concis ou d’user de méthodes plus rapides. Certaines commandes peuvent par exemple être réunies et combinées en une seule. Un code simplifié et optimisé est plus élégant, plus facile à lire et surtout fonctionne plus vite. C’est alors moins de temps machine utilisé, moins de dépense énergétique.</p><p>Optimiser, gagner en rapidité et en ressources, c’est aussi se soucier du matériel plus ancien. Quel intérêt a votre programme s’il faut systématiquement le dernier ordinateur en date pour le faire tourner ? Les utilisateurs se tournent plus facilement vers des solutions économes et votre souci d’optimisation montrera votre habileté et votre sérieux dans le code.</p><p>Optimiser, c’est aussi se soucier de l’utilisateur et des erreurs possibles. On tente alors de se mettre à la place de ce dernier et de lister les problèmes qu’il ou elle peut rencontrer. N’hésitez pas à tester votre programme auprès d’autres personnes. Quand on a le nez dans le guidon, il est souvent difficile de repérer ses erreurs.</p><p>Un exemple d’erreur ? De nombreux formulaires en ligne examinent la saisie au cours de la frappe et affiche un message d’erreur en rouge de manière un peu trop systématique. Lorsque vous entrez une adresse mail et que vous voyez apparaître le message « adresse mail non valide », il y a de quoi se poser des questions. En fait, tant que l’adresse entière n’est pas tapée, elle est forcément non valide. Un utilisateur averti saura de quoi il retourne. D’autres seront bloqués. La solution toute bête est de vérifier la saisie lorsque l’utilisateur valide le formulaire et non lors de la frappe. Erreur de design, erreur de développeurs qui ne se sont pas mis à la place de l’usager…</p><p><strong>11 — Comparer, examiner le code des autres</strong></p><p>On apprend en observant. Observer n’est pas copier, reprendre des bouts de code sans trop savoir à quoi cela sert. Observer, c’est examiner, analyser, essayer de comprendre la méthode de tel ou tel développeur et ensuite trouver sa propre méthode. Chaque fois que cela est possible, n’hésitez pas à examiner le travail des autres et à en tirer vos propres solutions.</p><p><strong>12 — Poser des questions</strong></p><p>Il existe des forums spécialisés, des sites regorgeant d’articles. Le problème sur lequel vous planchez ne trouvera pas forcément sa réponse immédiatement mais il y a de fortes chances que vous ne soyez pas le seul dans votre cas ou qu’un autre problème s’en rapproche. Après avoir fait quelques recherches, avoir documenté votre problème, n’hésitez pas à poser la question sur un forum non sans avoir clairement expliqué la situation qui vous bloque. Un « Ca marche pas » ne résout jamais rien.</p><p><em>Originally published at </em><a href="https://secouezlecours.wordpress.com/2018/10/09/12-trucs-et-astuces-pour-apprendre-a-coder-parce-que-10-cetait-trop-court/"><em>secouezlecours.wordpress.com</em></a><em> on October 9, 2018.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=917df3879652" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>