Jekyll2019-01-25T03:49:07+00:00https://clementroblot.com/feed.xmlClément RoblotFreelance software developpement to make your business and ideas go forward one step at a time.Where does a POC stops and the MVP starts2018-11-19T01:28:03+00:002018-11-19T01:28:03+00:00https://clementroblot.com/developpement/startup/product/design/2018/11/19/where-does-a-poc-stops-and-the-mvp-starts<p><img src="/assets/images/articles/rocket.png" alt="Rocket launch" title="Picture from NASA Goddard Space Flight Center" /></p>
<p>For once let’s talk project management instead of pure code. I personally gets the urge to push my pocs too far and stepping out into the MVP world. Let’s define a boundary between those two worlds (this is an opinions and will obviously not be shared by everyone)</p>
<h2>Beauty</h2>
<p>The POC and the MVP have something in common : they both are very ugly. The point on either of those steps of the project are not to be beautiful, it is to fulfill the one feature you have in mind.</p>
<h2>Practicality</h2>
<p>The POC is usable only by it’s creator. And even for him/her, it is painful to make it work.
The MVP on the other hand needs to be usable by anyone of your future customers. Plus they need to be able to use it by themselves, without any assistance.</p>
<h2>Feature coverage</h2>
<p>Both the POC and the MVP cover only the main core feature of your project. No fancy side features, only 1. That main feature is the one you need to test to see if you business is viable or not.
Adding side features is something very very tempting for everyone involved. But if your core feature is shit, it will be a waste of time. The all point of this endeavor(POC and MVP) is to test your idea; not to develop the product (that comes later)</p>
<h2>Conclusion</h2>
<p>In your next project personal or professional, think about what are your goals with your current step of the project, do you want to build a full product, test if a feature could work, test the reaction of your users ? And adapt the steps to follow toward that goal and only that goal.</p>For once let’s talk project management instead of pure code. I personally gets the urge to push my pocs too far and stepping out into the MVP world. Let’s define a boundary between those two worlds (this is an opinions and will obviously not be shared by everyone) Beauty The POC and the MVP have something in common : they both are very ugly. The point on either of those steps of the project are not to be beautiful, it is to fulfill the one feature you have in mind. Practicality The POC is usable only by it’s creator. And even for him/her, it is painful to make it work. The MVP on the other hand needs to be usable by anyone of your future customers. Plus they need to be able to use it by themselves, without any assistance. Feature coverage Both the POC and the MVP cover only the main core feature of your project. No fancy side features, only 1. That main feature is the one you need to test to see if you business is viable or not. Adding side features is something very very tempting for everyone involved. But if your core feature is shit, it will be a waste of time. The all point of this endeavor(POC and MVP) is to test your idea; not to develop the product (that comes later) Conclusion In your next project personal or professional, think about what are your goals with your current step of the project, do you want to build a full product, test if a feature could work, test the reaction of your users ? And adapt the steps to follow toward that goal and only that goal.Is embedded development dying?2018-11-05T01:28:03+00:002018-11-05T01:28:03+00:00https://clementroblot.com/developpement/c/language/python/programming/2018/11/05/is-embedded-development-dying<p><img src="/assets/images/articles/psoc.jpg" alt="PSOC MCU" title="PSOC MCU" /></p>
<p>Have you noticed how more and more projects use python when in the past they would have use C/C++? I’m certainly seeing it.</p>
<p>Don’t get me wrong, I love python, it is so much more enjoyable to code than embedded C. I’m not here to complain “It was better in the old days”. I would like to reflect a bit about whether embedded programming is bound to die or not.</p>
<h2>Low level not required anymore</h2>
<p>Having learned how to code for the first time using assembler on a 8bit microcontroller, I was able to see the evolution of the programing languages and techniques until today. Back in the days having an OS on your microcontroller was ridiculous : way too big. Nowadays it is more and more difficult to find a project that doesn’t use an OS (like freeRTOS for example).</p>
<p>The fact is that Moore’s law might be dead for big processors, it is still going quiet well for the smaller ones. Every generation gives more processing power, more memory, more connections. Modern microcontrollers (high end) have 100MHz processor, USB and Ethernet. At that point it is not a micro anymore, it is a small computer.</p>
<p>Having a more powerful target, you can start using a little bit more abstracted languages like going from assembler to C, or from C to C++ maybe even python.</p>
<p>That process works both ways, electronics are more and more powerful, but computer are also smaller and smaller (raspberry pi for example). Why bother developing custom electronics when you can get a small powerful computer for very cheap.</p>
<h2>Big data to the rescue?</h2>
<p>At the same time I see this unfolding regarding the low level, we see more and more companies managing huge amount of data. And more generally project where having the best hardware is a given, but you want to get as much as possible out of it.</p>
<p>In those cases I can see more and more applications for the concepts that are deployed in low level programming. Memory managements, algorithm optimization, network optimization, all those are part of the daily tasks of the low level developer.</p>
<h2>To conclude</h2>
<p>Moore’s law keeps on being applied at the law level giving use more and more powerful hardware allowing us to use more powerful methods and languages. At the other end of the spectrum bigger and bigger sets of data forces us to keep the low level knowledge or resource management for those application.</p>
<p>An other killer of low level could be the smartphone : why have a new electronic device when an app fills out the need, I wrote on that subject here.</p>Build a single file executable for your python app2018-10-29T03:28:03+00:002018-10-29T03:28:03+00:00https://clementroblot.com/pyhton/deployement/installation/2018/10/29/build-a-single-file-executable-for-your-python-app<p><img src="/assets/images/articles/pythonSingleFile.png" alt="Image illustration python" title="Image illustration python" /></p>
<h2>Tl;Dr</h2>
<p>Use <a href="https://www.pyinstaller.org/">PyInstaller</a> to build your single file executable for your app.</p>
<h2>How to</h2>
<p>You got your app with all it python files. Now it is time to deliver it to your users. Lets make it clean and easy to use : lets build a single file that the user simply need to double click on.</p>
<p>First of all we will install PyInstaller :</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>pip install pyinstaller
</code></pre></div></div>
<p>Then when navigating in your app app simply run PyInstaller like :</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>pyinstaller yourprogram.py
</code></pre></div></div>
<p>This should build you your executable, given it is a simple enough one. If everything goes according to plane you will have a nice “dist” folder containing your bundled app.</p>
<h2>Things goes wrong</h2>
<p>Maybe you have a more complicated app and it is not that simple. PyInstaller will build you a “yourprogram.spec” file. This file contains all the dependencies of your app. Most certainly your app is using some hidden dependencies that PyInstaller cannot guess. For example I was using gevent as a socketIo server, but it was dynamically loaded by the flask-socketio package. I had to add “engineio.async_gevent” to the list of “hiddenimports” in my “yourprogram.spec” file to make my app work fine.</p>
<p>Once you added your hidden dependencies, you need to run PyInstaller on that spec file (not on the py file or it will overwrite the spec file you just changed) :</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>pyinstaller yourprogram.spec
</code></pre></div></div>
<p>This hidden research of dependencies might be a bit tedious but the result is worth it when it comes to make your app easy for your user to use it ;) .</p>Python QT : make your app magical with QSettings2018-10-22T03:28:03+00:002018-10-22T03:28:03+00:00https://clementroblot.com/pyhton/qt/pyqt/python3/programming/2018/10/22/python-qt-make-your-app-magical-with-QSettings<p><img src="/assets/images/articles/pythonSettings.png" alt="Image illustration python" title="Image illustration python" /></p>
<p>What does make a smartphone app feel magical that a desktop app doesn’t have? To me it is the ability to remember the past. Lets add that to our PyQt apps!</p>
<h2>TL;DR</h2>
<p>In short : Use the QSetting object to save and reload the status of your app. Use the value method to fetch a value from your setting file, use the setValue method to save a variable.</p>
<h2>The Built</h2>
<p>Lets build an interface where the user needs to enter a message to send over a chat. To me the best way to make that app magical is to remember the typed message and reload it when we reopen the app.</p>
<p>Here is the basic of the app without any QSettings in it :</p>
<script src="https://gist.github.com/karlito139/86ebab8a717244986d8cceec20d06df3.js"></script>
<p>Now we will add 2 elements to that app :</p>
<ul>
<li>A saving system when we change the text of the current pending message</li>
<li>A loading of the old value from the setting file (in the constructor)</li>
</ul>
<p>The addition of those two bits of codes makes the app look like that:</p>
<script src="https://gist.github.com/karlito139/67b9792476ddb11edd24143441f3cdf0.js"></script>
<p>That way when you open the app again your old message is still there. That is one of the ways I make my apps feel magical for the user. If you have other ways in mind, please share them in the comments.</p>Python QT custom signals and slots2018-10-15T03:28:03+00:002018-10-15T03:28:03+00:00https://clementroblot.com/pyhton/qt/gui/programming/pyqt/2018/10/15/python-qt-custom-signals-and-slots<p><img src="/assets/images/articles/pythonSignals.png" alt="Image illustration python" title="Image illustration python" /></p>
<p>Having learned QT in C++, now using it in python raised a few struggles. Today we talk about how to implement custom signals in your objects.</p>
<p>We will be building a simple toggling button that emit a custom ON/OFF signal when pressed.</p>
<h2>TL;DR</h2>
<p>In short :</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Your object needs to inherit from QObject
Your signal is declared outside of your constructor
</code></pre></div></div>
<h2>The Built</h2>
<p>Our widget is going to inherit from QPushButton, and we are simply going to change the displayed text based on an internal state we will be toggling on every press. I will not enter in the details of building such an object (it could be the subject of an other article). Here is my implementation :</p>
<script src="https://gist.github.com/karlito139/e8b785eb3e5f1ba397b012c58aeb05f3.js"></script>
<p>To this base we simply want to add a new signal. The first thing is to make sure your object inherit from QObject. In C++ you need the macro “Q_OBJECT” in your header file to be able to use the signals, here in python this is done through the inheritance with QObject. In our precise situation, we are inheriting from QPushButton which inherit from QWidget, himself inheriting from QObject. Which mean we are already fulfilling the first requirement.</p>
<p>The second thing to be careful about is to define your custom signals outside of your constructor. If not you will have an error message and a crash (so you will not miss it ;) ).</p>
<p>In our case that modifies the widget like that :</p>
<script src="https://gist.github.com/karlito139/d869f069675a5021d838804353afbade.js"></script>
<p>Hope this was helpful, if you are struggling with some implementation of PyQt and would like me to make a small article on that specific subject, leave your request in the comments ;) .</p>
<p>A full implementation of the button is available <a href="https://gist.github.com/karlito139/3eec2db2bf7e01c9b44a95e1472b84f7">here</a>.</p>IOT product or smartphone app?2018-10-09T03:28:03+00:002018-10-09T03:28:03+00:00https://clementroblot.com/iot/embedded/software/reactnative/developpement/2018/10/09/iot-product-or-smartphone-app<p><img src="/assets/images/articles/iot.jpg" alt="Image illustration IOT" title="Image illustration IOT" /></p>
<h2>IOT product or smartphone app?</h2>
<p>I have been developing project mostly in the embedded world for a few years now. I love electronics and micro-controllers, but I can see smartphones being able to do more and more while being the most available resources in our lives.</p>
<h2>Smartphones everywhere!</h2>
<p>Smartphones are quiet amazing with almost all the sensors you can hope for. Plus all the connectivity you wants, plus more computation than you need.</p>
<p>With such specs you could expect a lot of IOT devices to be obsolete. For example a portable gaming system like the sony PSP doesn’t make much sense when compared to a smartphone. Similarly an alarm clock doesn’t provide any value when your smartphone is always withing reach.</p>
<p>Also those examples are already seeing a decline in use, I see myself still being frustrated by remotes. Weather for TV, AC, lights I do not want to search for those things that always get lost. My smartphone will do a way better job of controlling them.</p>
<h2>Are IOT products already dead?</h2>
<p>Knowing that, are smartphone going to replace the entire hardware world? Well why not. But for now those devices still are not magical (yet). And I can see a few reasons why you would still want some IOT devices over a smartphone:</p>
<ul>
<li>You want to develop some weird specific human interaction like: obital 2</li>
<li>You want to limit user freedom on purpose like: quizflip shielding you from notifications: Fl!p</li>
<li>You have a nice design like: the counter smiirl</li>
</ul>
<p>I do not see any other cases where IOT hardware products have more sens than a smartphone app. Comment your ideas if you disagree.</p>
<h2>Should I stop hardware and start react-native?</h2>
<p>In the end it is all about providing a valuable experience to the user. A smartphone app will maximize ease of use. A hardware product will guide the user in a more controlled way of using the product.</p>
<p>Through the design of custom IOT product you have more variables at hands making your task harder as a designer but also giving more potential and more freedom in your creation.</p>
<p>In your next thinking session, wonder if an app could be enough. If not what feature will be lost in this process of “appifying” your product ? Is it a big loss ? If yes IOT if for you, if not you might want to look into react-native.</p>Il est temps de mettre à jour votre contrôle de version2018-06-12T03:28:03+00:002018-06-12T03:28:03+00:00https://clementroblot.com/cdv/git/svn/equipe/d%C3%A9veloppement/2018/06/12/Il-est-temps-de-mettre-a-jour-votre-controle-de-version<p>Attention : ceci n’est pas un article discutant d’une nouvelle technique super avancée de contrôle de version. Je ne fait que rappeler ce qui est disponible très facilement aujourd’hui et donc devrait être utiliser beaucoup plus.</p>
<p><img src="/assets/images/articles/git_commit.png" alt="XKCD git commit" title="XKCD git commit" /></p>
<center>Source : <a href="https://xkcd.com/1296/">https://xkcd.com/1296/</a></center>
<h2>Introduction</h2>
<p>J’ai maintenant travaillé avec plus d’une dizaine d’organisation en France et les méthodes de gestion du code mis en place ne sont pas toujours au top de ce qui est disponible aujourd’hui. Je ne parle pas de quoi que ce soit de révolutionnaire ou spécialement nouveau, mais simplement avoir un système qui :</p>
<ul>
<li>Permet de collaborer facilement sur des partie de code et permet à chacun de commenter sur le code des autres</li>
<li>Permet de tracket qui a codé quoi</li>
<li>Permet de tracker une liste de bugs et features</li>
</ul>
<p>Les différentes situations que j’ai rencontré sont en général :</p>
<ul>
<li>Pas de gestion de version du tout, on s’envoie les codes par email sous forme de zip et la dernière version est celles avec le plus de “_final” à la fin du nom.</li>
<li>Un git ou un svn tout simple derrière un SSH ou sur un NAS.</li>
</ul>
<p>Cette seconde méthode est déjà beaucoup mieux que la première. Mais il y a peu d’option de collaboration, et aucun tracking de bugs. Juste un tracking du code.</p>
<h2>Les problèmes</h2>
<p>Un cas auquel je ne m’attendais pas est que tous les dev ne sont pas digne de confiance. À tel point que j’ai interagie avec 2 compagnies qui se sont fait voler dans un cas une partie, dans l’autre tout son code. Et je ne parle pas de copier le code, mais bien de voler. Ces compagnies ont payé pour développer un logiciel et n’ont pas ou plus accès aux sources du dit logiciel.</p>
<p>Dans le cas où il y a un simple git, c’est déjà beaucoup mieux. Le code est sur un serveur qui effectivement agit comme backup. Et en plus de cela on a un historique de qui a codé quoi dans quel ordre. Le problème avec cette approche est quelle gère bien le passé mais ne fait rien pour le futur. Notre but en temps que développeur est de développer l’avenir du projet, pas d’archiver le passé.</p>
<h2>Ce qui est disponible aujourd’hui</h2>
<p>Aujourd’hui il existe des systèmes qui intègrent toutes ces fonctionnalités proprement dans un seul logiciel. Les 3 solutions dominantes sont :</p>
<ul>
<li>github</li>
<li>gitlab</li>
<li>bitbucket</li>
</ul>
<p>Ces 3 solution font grosso modo la même chose à différent coûts et avec différents niveau de support. Cet article étant destiné à des organisation de petite taille avec quelqu’un prêt à proposer l’emploi d’outils plus modernes, je ne vais aborder que la solution gitlab car c’est celle qui se prête le mieux à l’expérimentation sans risque.</p>
<p>L’absence de risque vient du fait que la version gratuite est amplement suffisante pour la majorité des PME (je l’ai déployé pour une R&amp;D de 30 personnes bossant sur des domaines allant de la conception hardware au front-end web (“super fulll-stack”)). On peut utiliser gitlab en ligne, mais aussi simplement l’installer sur son PC pour tester.</p>
<p>Enfin, le plus important (et ceci est valable pour les 3 solutions) : si les choses foirent, si plus rien ne marche sur votre installation, le code n’est pas perdu. Il est sauvegardé sous forme d’un dossier git. Donc en cas de gros plantage il suffit de copier coller ces dossiers et aucun code ne sera perdu.</p>
<h2>Les fonctionnalités</h2>
<p>C’est bien beau que ce soit sans risque et gratuit etc…. mais quel est l’intérêt, concrètement en quoi ces outils améliorent le process de développement. Voici un liste des fonctionnalités qui me paraissent les plus intéressantes :</p>
<ul>
<li>Pull request : permettant de demander l’intégration d’un groupe de commit dans une branche. Cette étape permet une revue de code facile des modifications apporté.</li>
<li>Intégration continue : permet de lancer un script maison à chaque commit. Par exemple pour lancer les tests unitaires. Le résultat sera affiché ans l’interface web de gitlab.</li>
<li>gestion des droits : il est possible de gérer les droits des utilisateur pour limiter l’accès et l’étendu des pouvoir qu’un utilisateur a sur un repo de code.</li>
<li>Bug tracking : une liste de bugs et fonctionnalités qui s’intègre proprement au système de gestion de code. Ainsi il est possible d’assigner un utilisateur à la résolution d’un bug. Mais surtout il est possible de garder une trace des commits qui ont corrigé ce bug (très pratique en cas de réapparition du dit bug plus tard).</li>
</ul>
<p>Bien sure ce n’est qu’une toute petite liste de ce qui est disponible, et étant donné que gitlab est open source, vous pouvez toujours y ajouter les fonctionnalité qu’il vous manquerait par vous même. Mais cela m’étonnerais étant donné la liste colossales de fonctions déjà intégré : https://about.gitlab.com/features/.</p>
<h2>Conclusion</h2>
<p>J’espère que cet article vous a motivé suffisamment pour jeter un coup d’œil à ce genre de systèmes et tester si ces outils pouvant améliorer votre processus de développement. L’intérêt de ce genre d’outil est qu’un gain de productivité même minime s’applique à toute la R&amp;D de votre entreprise ce qui devient très vite significatif.</p>Attention : ceci n’est pas un article discutant d’une nouvelle technique super avancée de contrôle de version. Je ne fait que rappeler ce qui est disponible très facilement aujourd’hui et donc devrait être utiliser beaucoup plus.It’s time to update your version control2018-06-12T03:28:03+00:002018-06-12T03:28:03+00:00https://clementroblot.com/versioncontrol/team/developement/git/svn/2018/06/12/It-is-time-to-update-your-version-control<p>Warning: this is not an article discussing a new super advanced version control technique. I only present what is available very easily today and so should be used a lot more.</p>
<p><img src="/assets/images/articles/git_commit.png" alt="XKCD git commit" title="XKCD git commit" /></p>
<center>Source : <a href="https://xkcd.com/1296/">https://xkcd.com/1296/</a></center>
<h2>Introduction</h2>
<p>I have now worked with more than a dozen organizations in France and the code management methods put in place are not always at the top of what is available today. I do not mean anything revolutionary or especially new, but simply have a system that:</p>
<ul>
<li>Lets you collaborate easily on parts of code and allows everyone to comment on the code of others</li>
<li>Track who coded what</li>
<li>Track a list of bugs and features</li>
</ul>
<p>The different situations that I met are in general:</p>
<ul>
<li>No version management at all, we send the codes by email as zip files and the latest version is the one with the most “_final” at the end of the name.</li>
<li>A simple git or svn behind an SSH or on a NAS.</li>
</ul>
<p>This second method is already much better than the first. But there is little collaboration option, and no bug tracking. Just a tracking of the code.</p>
<h2>The problems</h2>
<p>One thing I did not expect is that all devs are not trustworthy. So much so that I interacted with 2 companies that got their code stolen in one case part of their code, in the other all of it’s code. And I’m not talking about copying the code, but about stealing. These companies have paid to develop software and they do not have access to the sources of the said software.</p>
<p>In case there is a simple git, it is already much better. The code is on a server that actually acts as a backup. And on top of that we have a history of who coded what in what order. The problem with this approach is that it manages the past well but does nothing for the future. Our goal as a developer is to develop the future of the project, not archive the past.</p>
<h2>What is available today</h2>
<p>Today, there are systems that integrate all these features in a single software. The 3 dominant solutions are:</p>
<ul>
<li>github</li>
<li>gitlab</li>
<li>bitbucket</li>
</ul>
<p>These 3 solutions are roughly the same at different costs and with different levels of support. This article is intended for small organizations with someone willing to push forward the use of more modern tools, I will only address the gitlab solution because it is the best suited to the experiment without risk .</p>
<p>The lack of risk comes from the fact that the free version is more than enough for the majority of SMEs (I deployed it for an R&amp;D of 30 people working on domains ranging from hardware design to web front-end (“super fulll -stack “)). You can use gitlab online, but also simply install it on your PC to test.</p>
<p>Finally, the most important (and this is valid for the 3 solutions): if things go bad, if nothing works anymore on your installation, the code is not lost. It is saved as a git folder. So in case of big crash just copy these files and no code will be lost.</p>
<h2>Features</h2>
<p>It’s fine that it is safe and free etc …. but in what ways do those tools improve the process of development. Here is a list of features that seem to me the most interesting:</p>
<ul>
<li>Pull request: to request the integration of a group of commits into a branch. This step allows for easy code review of the changes made.</li>
<li>Continuous Integration: allows you to run a home made script for each commit. For example to launch unit tests. The result will be displayed in the gitlab web interface.</li>
<li>Rights Management: It is possible to manage the rights of users to limit the access and scope that a user has over a code repo.</li>
<li>Bug tracking: a list of bugs and features that integrate properly with the code management system. Thus it is possible to assign a user to the resolution of a bug. But above all it is possible to keep track of the commits that corrected this bug (very useful in case of reappearance of the said bug later).</li>
</ul>
<p>Of course this is only a very small list of what is available, and since gitlab is open source, you can always add the functionality you would miss on your own. But that would surprise me considering the colossal list of features already integrated: https://about.gitlab.com/features/.</p>
<h2>Conclusion</h2>
<p>I hope this article has motivated you enough to take a look at these kinds of systems and test whether these tools can improve your development process. The advantage of this kind of tool is that a productivity gain even marginal applies to all the R&amp;D of your company which quickly becomes significant.</p>Warning: this is not an article discussing a new super advanced version control technique. I only present what is available very easily today and so should be used a lot more.