The Adafruit PyPortal is a great device, with a few bells an whistles already integrated in order to start small electronic projects (but expensive, ok ;-)). As usual, Adafruit wrote a nice introductory guide. But some parts are outdated. Therefore, here are a few steps to get you started with CircuitPython on a PyPortal in 2021 …Continue reading “Start with a PyPortal in 2021”
Trend in COVID-19 cases by Zip code in Maryland
Since the Maryland Department of Health (MDH) started to display number of COVID-19 cases for each Zip code in its dashboard, I was wondering how to display this information in a nice way. The MDH display the information as a map – very nice but it lacks from where each Zip code came from: is the number of cases increasing or decreasing?
Following on my busy chart with the evolution of all Zip codes (and highlighting just one of them – that may not be the one you are interested in, see previous post), I created a simple dashboard where you can select the Zip code you are interested in and see how cases are evolving. You can play with it here: https://jepoirrier.shinyapps.io/md-coronavirus-zip-app/ (screenshot below). Enjoy!
As usual, the data is from the MDH coronavirus page. Please consult that page for official information. The data is in this file on the Github repo for my other project related to Coronavirus in Maryland.
Programming Merit Badge presentation (2020)
This year, my elder son graduated from Cub Scouts to Scouts (time flies very fast!) and I signed up to be a counselor for Programming (and Public Health) in his troop.
Today, February 1st, 2020, was Merit Badge Day and I taught 6 scouts what is programming and the basics of programming in Python (and Scratch – but they all knew that already) (and nobody chose Public Health …).
I am now sharing my presentation and a few tips and tricks. Feel free to re-use, improve and give me any feedback to make it better.
Here are the presentation files (they are also on GitHub):
I want to highlight that some content was taken from other counselors who made their presentations available online too:
- Eric Silva‘s BSA Programming Merit Badge STEM on SlideShare (see also his repo of Python programs for this badge on Github)
- Bob Baker’s Programming Merit Badge presentation (and repo on Github)
- Nate Swedberg’s Programming Merit Badge presentation on SlideShare
The Boys Life magazine has also a dedicated page with a lot of resources for this Merit Badge. One of the nice features is that scouts can see the same simple program coded in different programming languages, allowing to compare them. They can be the basis for some of their requirements too.
It was the first time I gave this Merit Badge and having 6 scouts is a good number. You’ll face some issues helping them start programming, especially if all of them are new to programming. Also, it’s interesting to have scouts of approximately the same age: they will have similar reactions and they will be at similar level of programming. I had 5 6-graders and one older scout: the older scout had already a higher level of programming (and he kindly helped younger scouts). Also, big mistake from first-time counselor: do not give them the WiFi password at the beginning of the session! 🙂 Ask them to pre-install Python (if they bring their Windows laptop) and only allow them on internet when coding … You’ll thank me later 😉
I went through Safety, History of programming and Programming today in about 1 hour and 20 minutes, which was a bit too long (despite the good interaction and participation).
Then I programmed with them a converter between degree Fahrenheit to degree Celsius. Typing with them and running the script line by line was a good way for them to understand basic programming concepts like variables, case-sensitivity, functions and branching. The files we used as examples and code are on GitHub. From no knowledge of Python to this temperature converter: about 1 hour.
Finally, I covered Intellectual Property and Career in 10-15 minutes. That’s a little bit short. We had no time to enter into too many details. But scouts will have the additional pointers at the end of the slides and this will be a good introduction already.
Final thought? It’s time consuming to prepare all this material (and I thank the other counselors who shared their material!) but it’s also very rewarding to see children (well, teens) discover programming! I encourage you to share things you like as Scout Counselor!
Digitize you charts with Engauge Digitizer
A few words of appreciation for an open source software that can help you a lot in your work, Engauge Digitizer (ED) from Mark Mitchell. ED is a simple, straightforward curve digitizer: it takes images with graphs like the one below and transform them (with a little help) in data you can use later on.
Continue reading “Digitize you charts with Engauge Digitizer”
How to redesign a numeric keypad?
In an interesting blog post on Smashing Magazine, C.Y. Gopinath explained the design choices he made to build a new calculator for smartphones (iPhones more specifically). He started with an interesting summary of the reasons and origins of the numerical keypads of phones and calculators (keyboards, ATM, etc.). This is what drove me to read his post. Indeed I posted a photo on Flickr that showed the difference, a few years ago.
While reading the post, I was happy the author of the app did some research on the traditions behind this keyboard layout as well as the reasons and studies that lead to these layout. The article also contains links to further details, if necessary, and interesting comments from Harry Blanchard and Michael Long.
However I think the author mixed several things before re-designing his numerical keypad …
Circular design with numbers already exists in the real world: the analog watch (also mentioned in a comment). I guess most if not all humans above 10 years old are used to this design and the way it starts with “0” (well, “12”) at the top and “6” at the bottom. So when I saw Gopinath’s app screen, I was wondering if there is a reason or if there are research showing the tilt is beneficial and will not confuse for the user.
Citing research from Bell Laboratories is great: very few apps did this amount of research and still show “revolutionary” user interfaces based only on the gut feeling of a designer on steroids (when there was a designer) (to be fair, some new designs achieve their goals). However the period during which they were conducted (early/mid-last century) has most probably a large role to play in the choices and habits of respondents. One thing in particular is that people most probably would use these numerical keyboards sitting on the table (like phones on table) and use their finger (or fingers but I expect the index being the single most used finger) of one hand.
What could be the response now? Only research would tell. My feeling is to start from habits of smartphone users. My own use would consider the following facts:
- so far smartphones are still square / rectangle objects
- most smartphones are still small enough to be held with only one hand and one finger on the same hand would be used (the thumb)
- if smartphones are too big to be used with only one hand, either you hold it with 2 hands and use your 2 thumbs (text messaging) or you hold it with 1 hand and use one finger from the other hand.
I did not (yet) witness cases where the user types on a smartphone with many fingers, like a typist would use all his/her fingers on a keyboard.
Therefore I would rather see another “radical” design like this one (case phone held with 2 hands, using 2 thumbs to type):
I was also wondering why the author added so many gesture and swiping left, right, center. In his assessment of other calculators, it was mentioned that they offered little or no feedback. How these gestures can be intuitive or discovered by the user? I must admit I didn’t install the app but I guess there should be a tutorial for all these gestures. In my opinion, these tutorials are however the admission that these features were not intuitive, that the discoverability principle was forgotten, most probably on the altar of minimalism …
Although I appreciated the author’s research and share most of the author’s comments on current numerical keyboards, I don’t think the current implementation solves the issues of user-friendliness, discoverability and the greater goal of making kids love maths. Ironically, the “Edit History” page of the app shows the standard, old-fashioned numerical keyboard …
Fedora 23 on a Dell XPS13 (part 1)
Taking advantage of a trip to Canada and a very favourable CAN$:€ exchange rate, I bought a Dell XPS13 (9350 or “late 2015”), following excellent reviews from around the web. Dell sold a ‘developer edition‘ of this laptop (shipping with Ubuntu Linux) but unfortunately it was out of stock on Dell US and I couldn’t find the item on the Dell Canada website. So I bought the Windows version with a touchscreen (it was Black Friday :-)).
Here is how to install Fedora 23 on it (and probably most other Linux distribution) … I will focus on three aspects (in brief: everything works out of the box, except the wireless card that needed some additional action):
- How to boot and install Fedora Workstation
- What works and what doesn’t work out of the box
- Some things to do after installation (additional software)
Import PDFs and related metadata in Zotero
I discover new things everyday …
I wrote earlier that I really liked Zotero, a reference management software. However, there is one thing that was missing, imho: the capability to import PDFs (individually or in bulk) and correctly fill in the various fields of the reference.
But in fact, this already exists in Zotero! Just drag a PDF in the middle section (the reference list) then right-click on it and choose “Retrieve Metadata from PDF” (*). Retrieval of the title, the authors, the journal, etc. everything goes very fast and they are stored as a normal reference, now on the right.
Now, it works for most papers I tested yesterday and today. Most major editors are supported (it seems Zotero doesn’t actually extract metadata from the PDF but finds these metadata by comparing the PDF content with Google Scholar). As hinted in the Zotero support page for this function, please re-check the imported reference in case something went wrong (I imported something like 20 references since yesterday with this function and I didn’t spot any error for the moment).
Bulk import and metadata retrieval works too: just import several PDFs at the same time and, while all of them are selected in Zotero, right-click on them and choose “Retrieve Metadata for PDF”.
As mentioned earlier, “it’s just plain efficiency, without bells and whistles“. It just works 🙂
(*) On MS-Windows, on the first use, you might see a dialog box warning you that you must first install the “PDF tools”.
If you see it, just choose the “Open preferences” button and follow the very intuitive procedure. The installation takes 30 seconds maximum, download included.
Jadoo and static website generators
Coming back from holidays, I fired my RSS reader and, among many interesting posts, I found this one from Smashing Magazine about static website generators being the Next Big Thing on the web (and a follow-up deep-diving into four of them).
The first paper describes how the web started as something static, became all dynamic and is progressively coming back to something more static, at least for some specific tasks. The interesting thing is that the author also describes pros and cons of each stage and why the web jumped to the next level.
While reading this, I couldn’t help thinking of Jadoo, a pet project I started in 2007. Its goal was to get rid of the complexity and number of resources required to run a dynamic blog system. Following some notes from Alexandre Dulaunoy, it was written in Python and already used concepts now hidden under buzzwords 😉 like templating and a rudimentary meta-data organization. At that time, there was nothing like Markdown, assets management, caching, Github, … (not as widespread as today at least). There is an initial post and an update – then I gave up (reasons inside). Note drawbacks I wrote at that time are still drawbacks of current static website generators (manual update and local edition only). All these ideas in 2007, one year before Jekyll … 😉
P.S. The irony is that posts about Jadoo were later transferred to WordPress – and this blog is also npw currently hosted on WordPress!
Happy to use Zotero since a few weeks
For my work I need to reference a lot of statements, mainly with papers and books in the biological / medical literature. Usually “professionals” use two proprietary software, Reference Manager or EndNote (both owned by Thomson Reuters). But there are a few very interesting free alternatives (see this comparison of reference management software).
I switched from Mendeley to Zotero a few weeks ago and I’m very happy. Here is why … Continue reading “Happy to use Zotero since a few weeks”
Creating presentations with non-WYSIWYG tools
I work in a company that shifted from being R&D-driven to being project-driven. It is official since this 2013 but we saw it coming: the main pieces of memory are Powerpoint slides since a few years.
Everything is in Powerpoint, from agendas, discussions, presentations to minutes. Even when modelers want to show some results, they put them on a slide deck first …
For presentations I used to use Beamer but installing the LaTeX toolchain on a restricted, company-owned Windows laptop was a long and cumbersome process. I made a first presentation in Reveal.js this week. And I love it!
I prefer Beamer, Reveal.js and similar tools because a) it forces you to think of your message and its structure first and b) it forces you to reuse material that is already produced (rather than creating new things in / for the presentation medium). Therefore the presentation is a real presentation of something that really exists, that was really thought outside of the context of the presentation (and before it!).
The additional benefit (IMHO) of Reveal.js is that you just need a text editor and a browser. All restricted company laptops provide you with these tools.
The memory of my projects remains in my models, my notes and reports. The context, next steps and consequences are there. The project evolution is better understood (in reviews, audits and simple chats with colleagues).