Category: Projects

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.

jadooWhile 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!

Idea shared #2 – the feedback toothbrush

After the T-shirt that measures your sleep better than an app, here is idea #2: the toothbrush that provides some feedback.

The idea is simple – so simple it was already applied elsewhere. The idea is to provide feedback about the quality of the way people brush their teeth. The Brushduino focuses on entertaining kids to keep them brushing at the right place for the right amount of time. Other projects (with many variants) focus specifically on time spent brushing.

I think embedded projects can go an extra mile (provided they are small enough). You can embark a gyroscope and take into account the types and amount of movements you make while brushing your teeth. This way you also have the time you did it anyway. The toothbrush could communicate with a computer to transmit the data. I guess being offline would save some space at the price of direct feedback. This direct feedback could also come in a simplified way, a bit like the Nike+ Fuelband does: it is not an exact measure that you need but merely the fact you brushed vigorously enough and during enough time. The way a gyroscope work should give the space covered – indirectly if you covered every teeth (to be checked). Connection of the toothbrush to a smartphone or a computer could provide the numerical data as well as some social features (as long as you think brushing your teeth can be something shared with your friends).

In terms of design it could look simply like this:

This kind of device will not replace advices given by dentists. But it can help / accompany people during their daily activities.

Would you buy this device?

Creative Commons Licence
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

Idea shared #1 – measure your sleep

I don’t consider having more or better ideas than others. But I gradually realized I have less and less time for some activities like programming, electronics etc. Maybe that’s how we realize we are getting older now adults. So I decided to share these ideas rather than fueling the illusory idea that I will implement them one day.

So idea 1 is about measuring sleep. I recorded animals’sleep during my Ph.D. – but it was thanks to an EEG device. I think that if you want to understand or improve something you have to first measure it in a way or another. So I started to try to measure my own sleep with an app (Sleep Cycle). But despite its good reviews it doesn’t work, at least for me.

For instance the chart below is supposed to represent my sleep cycle for the night of the September 14th, 2012. I was certainly not in deep sleep at 1.30AM (baby did not want me to sleep immediately). I also woke up around 4AM (baby was again the reason). And I woke up at 6.45 (with a backup clock – had to wake up for work)?

My Sleep Graph with Sleep Cycle app for September 14th, 2012 night

The last version of the Sleep Cycle app improves things a bit by providing more statistics (so at last you can rely on the approximate time slept and compare your “sleep” across days etc.), more beautiful gaphs and the ability to download raw data. Don’t be fooled however, “raw data” means only start time, end time, sleep quality (how is it measured?), time in bed, number of wake ups and sleep notes. You unfortunately won’t be able to reproduce anything like the graph above.

Hardware devices like the Wakemate or the Zeo might give better results because part of the solution is using a real accelerometer. But the Up story shows that not everything is obvious in this world.

For me the fundamental flaw is to rely only on body movements to detect, quantify and even score sleep. Of course there is an abundant scientific literature about how muscle tone (of different muscles) is related to sleep stages (see here and here for introductory texts). But this is often measured by electrodes glued on your body.

So I think it could be very easy to develop a simple, cheap “sleep T-shirt” with light electrodes that will just stick to your body when you sleep (and you put enough of them so at any time at least some of them are connected). In fact it might happen that the Rest SleepShirt would already do the job – it’s a pity they don’t elaborate more on how they measure and collect data (but I understand they will want to sell the product later on ;-)). In my idea light wires would then go to a small pouch where they would be connected to something like a LilyPad Arduino (because it is flexible and can be sewed to a T-shirt – there may be other devices available). The LilyPad would serve as data collector or as data transmitter to a computer / a smartphone / a specific receiver (coupled to a real clock, like the Zeo). The advantage would be to remain sole owner of your sleep data – but of course the business plan should include some “social” features 😉

In the end it should look a bit like this:

Idea shared #1 - measure your sleep with sleep T-shirtThe other advantage would be that in such way you may also measure electrical activity through the body.

Will it work? I’m sure of it. Will it be enough to sleep correctly? I don’t think so: it’s not because you measure something that it improves. But at least you will have some clue on what is going on. Some other advices may be interesting. And for the moment nothing replaces a visit to a real doctor / sleep specialist!

Creative Commons Licence
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

Maximum number of characters in a Windows path is 260 characters

A Java project compilation went berserk and I ended up with a directory structure of more than 260 characters. I stopped the mad process but it already created more than 50 successive duo of path “build/classes” …

Duo of build/classes directories in path created by Netbeans

Now I had to delete this structure. And, to my surprise, it was impossible. When you try to just press the “Delete” key with the root directory selected in the File Explorer, you get a Path Too Long exception. The reason is that the maximum length of a path according to the Windows API (MAX_PATH variable) is defined as 260 characters. I tried some other methods but all of them failed:

  • write a small Java program that tried to delete the whole path: Netbeans (Java) was able to create this mess, why shouldn’t another Java program be able to delete it? Impossible.
  • write a small C++ program that tried to delete the whole path: as long as you stick with the Windows API, it’s impossible (I read that it could be possible using the boost::filesystem library but didn’t try).
  • try some Portable Apps utilities for file management: impossible (even when the software was using another framework like Qt).

Finally, I just ran a Cygwin terminal, went to the ad hoc location and did a simple “rm -rf libtest“. And voilà. So, next time Windows forbids me from doing something, it might be a good idea to directly rely on a true terminal from a Unix-like environment. I didn’t try a liveCD (I didn’t have such CD to hand) but it might be also possible.

ForbidSleepingMode updated

Following some comments on the dependency to version 4 of the .Net framework, I rewrote ForbidSleepingMode in C++. You can open and compile the project with Qt (open source). The source code is of course updated. The mandatory screenshot as well 🙂

forbidSleepingMode screenshot

As you can see, I took the opportunity to add a small field where you can specify your own interval at which the program will “tickle” your computer.


I just put my first small tool on GitHub: forbidSleepingMode. It will forbid your (Windows) computer to enter into sleep mode, acting as if there was activity all the time. I’m sure you can think of 1001 productive uses for such tool.

Technically, it just sends a “tickle” to the computer every 10 minutes forcing the display to remain on (hence: don’t set your screensaver to come before 10 minutes). Build it with Visual Studio 10 (I know, I know …).

The mandatory screenshot (very, very useful):

forbidSleepingMode screenshotI intend to re-publish old tools on GitHub as I find them.

Tetris wall

Dear wife,

I agree to have the decoration you want everywhere in our new home. You can have all the furniture and appliances you want in the kitchen. I’m OK if all the shelves with my computer books are in the basement. OK too if you don’t want to see the file server in the living room. Agreed: I’ll put back Windows on your laptop. But …

But I absolutely want one wall painted like these:

Tetris wall 1

Tetris wall 2

Jean-Etienne 😉

Photos found on (without original credit). Other walls with Tetris can be found on Flickr.