Tuesday, October 30, 2012

Time to move on?

Today I discovered that the Symfony framework does almost exactly (and more) what my own framework (FoRMAiD) aspires to be(come).
Now what? Start learning to use Symfony2 and cease further development of my own framework? Rewrite my own framework so that it builds on Symfony2 and add what is not available in it? Or stubornly ignore Symfony2 and continue as planned?

The first option, and maybe the second, seem appropriate, but still it is a bit disheartening to realise that all the time and effort that has gone into FoRMAiD might have been better spent.

But then again, I managed to create a working OOP based PHP framework, that is fully compliant with the PEAR coding standard. So I learned a lot and gained some valuable skills doing so. :)

Sunday, September 30, 2012

Tag based vs hierarchical file system structure

Imagine your hard disk, home drive, My Documents folder or by extension your mailbox. You probably have some kind of hierarchical structure sorting your holiday pictures and bank statements in separate folders, instead of keeping them all in the same folder.
But the hierarchy of those folders will probably look remarkably the same : a folder for each year, maybe divided in folders per month, with some kind self chosen structure, based on the name of your bank, the type of account, or where you went on holiday.
Now imagine that you have a savings account with two different banks. You will probably store the statements of these accounts in a hierarchical folder structure. So you will end up storing the statements of the first account with bank x in this folder :


\banks\bank_x\savings\year\month

And those of bank y in this folder :

\banks\bank_y\savings\year\month

They look remarkably the same, don't they, apart from the bank name.
Now add a folder structure for your mobile phone and land line invoices and those for gas and electricity, and you will get this kind of structure :

\invoices\telco\company_x\mobile\year\month
\invoices\telco\company_y\landline\year\month
\invoices\energy\company_w\gas\year\month
\invoices\energy\company_z\electricity\year\month

Do you see a pattern emerging?

Now imagine you are paying your invoices and are trying to get an overview of your spending and income. You start in your bank account folder and go down the year/month structure to get to this month's statements. Next you want to have look at an invoice for the same month, but to reach this folder you need go all the way up to the root folder, and then go down the structure of the invoices and companies, and then to the folder for the current year and month.

Wouldn't it be convenient to turn this hierarchy around, and sort it this way :

\year\month\service_x\company_y\type_z

But I guess you would probably want both structures? Depending on what you are trying to find, you would prefer one structure over an other. Or maybe there is a third/fourth structure that could be convenient.

Now image, that instead of dropping a file in a folder structure, being it an invoice, bank statement, holiday picture or love letter, you would assign tags to it. In case of an invoice from your telco for your mobile phone, it would probably get these tags :

telco_x, mobile, invoice, year, month

Tag based filtering


Now, imagine there is a filtering system. By filtering on the tags year and month, you will get an overview of the invoices and bank statements of that year/month. No need to go up and down folder structures to reach the documents of the same month.

Custom tag based hierarchies

Or if you would define a hierarchy based on these tags, you can still display your documents in a hierarchical way, or in another hierarchical way, if you define a different hierarchy, without the need of having to copy your documents to the other folder structure, or having to create symbolic links or shortcuts.

Creating extra tags

And if at some point you need an extra tag, f.e. you want to make a distinction between the mobile invoices of every family member, just add a tag with their names to the invoices. No need to create a separate folder structure for every family member.

Conclusion

So you end up with a system where you can still have your preferred hierarchical folder structure. But you can as easily have other custom folder structures and you have the flexibility to filter on files/documents in any way you like, as long as you assigned a tag for it to a file.

Application

These kind of systems exist, f.e. Gmail gives you the ability to assign tags to E-mails. Then these tags are used to sort your E-mails. An E-mail from a colleague about a sport activity at work or a could get the tags work and sports, while a mail from your club, could also have the tag sports.
When looking in the tag based folders sports you will see both mails, while looking in the folder work, you will get only the mail from your colleague.

Tag based file systems

Some examples, in no particular order :

Monday, August 27, 2012

Lion Time Machine on Debian

After an upgrade to Lion (Mac OS X 10.7) Time Machine didn't work anymore.
It had been configured to store the Time Machine files on a Debian file server, using samba. But from Lion on, AFP 3 is required by Time Machine.

Solution : install netatalk on the Debian server.
According to a blogpost, at least version of netatalk 2.2.0 is required. The version of the available Debian package is older (2.1.2), so this means compiling from source code.

Use netatalk 2.2.3, get it here, copy it your server and extract :

$ tar -jxpvf netatalk-2.2.3.tar.bz2
$ cd netatalk-2.2.3

To enable DHX2 authentication (which is required), Debian packages libgcrypt11 and libgcrypt11-dev need to be installed. The libgcrypt11-dev package is required otherwise the library will not be detected by the configure script and the DHX2 (UAMS) module will not be compiled in.

$ sudo apt-get install libgcrypt11 libgcrypt11-dev

Default settings would put netatalk in /usr/local/*, so use the settings below to put the files in /usr/bin/, /usr/sbin/, and /etc/

$ ./configure --enable-debian --prefix=/usr --sysconfdir=/etc
$ make
$ sudo make install

Check if installation was successful by running

$ afpd -v

It should show netatalk-2.2.3 on the first line.

Here you can find more information about the config files, but to make the Time Machine work add this line to the end of file /etc/netatalk/AppleVolumes.default

~/timemachine "TimeMachine" options:upriv,usedots,tm

This makes folder timemachine in the homedir of the user (which you need to create) available on AFP as volume TimeMachine.
Note that option tm needs to be added to support Time Machine on this volume.

When all is set, netatalk can be started and your Mac should be able to use volume TimeMachine for backups :

$ sudo /etc/init.d/netatalk start
 
On your Mac, you will have to execute this instruction in a terminal window to make it recognise the afp share as a timemachine :

Defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1 

Update (12Nov2012) : added section about allowing linux timemachine volumes on a Mac

Thursday, July 19, 2012

Ambitions

Enough with resolutions, enter ambitions and goals (some of them longterm, other shorter term) :

  • pick up Java and/or C++
  • improve knowledge of OOP and design patterns
  • write an Android app (update December 17th 2012 : created a first 'Hello World!' app)
  • release a first beta of my PHP framework (update August 12th 2012 : it was released)
  • Easily run 10 km in about an hour by the end of summer 2012 (update August 23rd 2012 : I ran 10K in an hour. Next goal, improve pace and distance)
  • Improve swimming (technique, speed, stamina and style) : Now that I can do 2km breaststroke in under an hour, build up stamina doing a slow front crawl (250m without a break)
  • start doing another sport : wall climbing, pick up squash again?

Sunday, May 13, 2012

Working towards a first bèta release

A few years ago, I created a small framework to help me develop web applications more easily, without having to reinvent the wheel every time, or even worse, duplicating already written code. At some point I decided to Open Source it, and created a project page on SourceForge, with the idea of creating a bèta release some day.
Many years have passed since, with changing activity on the framework, but recently I picked up the idea again to release it. The last few weeks I've been cleaning up the code and implementing some things I've learned and picked up over the years, like OOP design patterns.

There is still some work before it's ready to release, but I'm getting there, continuously improving it, step by step : Formaid : preparing for a first release

Thursday, February 09, 2012

Fosdem 2012 impressions

Back from FOSDEM 2012 and it was great again. More than 400 talks, about 5000 people attending, spread over multiple devrooms on ULB campus Solbosch in Brussels.


Listing everything I've done and seen is almost impossible, so I'll mention some highlights:

  • Coreboot is now available for a limited set of laptops
  • CERN is using Open Source Hardware
  • Tips and tricks for caching in web development
  • History of Open Source licenses, and other license related stuff
  • Team meeting with phpMyAdmin, outlining the future of the project
  • The talk of Freedombox mentions dreamplug : looks like a nice toy :)
  • Meeting a lot of people, both from my own team, people I've met at GSoC mentor summit, people from UGent and people I haven't met before
  • Community building : what works
  • Why Open Source should get non-geeks involved in their projects
And much, much more.

Looking forward to the next edition already : about 360 days to go. :)

Friday, February 03, 2012

Fosdem 2012

The yearly meeting of Free and Open Source Software Developers and enthousiasts is about to start. This weekend about 5000 people will come to Brussels for FOSDEM, to attend presentations, meet people and share knowledge.
I intend to go as well, if my health allows : I was hit by a virus in the beginning of this week and I am still recovering.
Anyway, apart from a lot of talks and presentations I want to go to, there is also a team meeting planned of my project, phpMyAdmin. And, at some point, I hope to run into some people I met at GSoC mentor summit last year.

Tuesday, January 03, 2012

Concept of a home made icy transistor

Some time ago I found out that ice (solid water) is a semi-conductor, like f.e. silicon and germanium. So this means that theoretically a diode or transistor can be made out of it, even at home with common products.

What follows is a back of the envelope reasoning, not a proof of concept, as I haven't tried it, but it might work.

First some rudimentary background about semi-conductors and how to make a simple component, like a diode or a transistor. A semi-conductor is basically an insulator that conducts electricity only in some circumstances, for instance when a semi-conductor is doped with another material to add electrons (negative, n-type) or to create 'holes' (positive, p-type), which can conduct electricity.
If a n-type semiconductor is joined by a p-type, you get a diode. If another p-type or n-type is added to create a npn or pnp-sandwich, you get a transistor.

So if frozen water (pure water (H2O), distilled) forms a semi-conductor lattice, it needs to be doped with something else to create the holes and electrons. More research is necessary to find suitable candidates, but for instance kitchen salt consists of sodium (Na) and chlorine (Cl) atoms which, when diluted in (pure) water, become positively and negatively charged ions.
By adding an electrical charge on two sides of the solution (pure water with f.e. a little bit of kitchen salt), most of the positively charged ions would be transfered to one side and the negatively charged ions to the other side. Freezing the solution at that moment would create an ice cube with a p-type and an n-type side, thus a diode.
Cutting a second diode ice cube in half and joining it with the other one, creating a npn or pnp sandwich results in a transistor.

This is just an idea, a lot of things need to be solved to make it work. For instance, what materials should be used to make n-type and p-type semi-conductors out of frozen water? How much of the material is needed? Will this work on a macroscopic scale (regular sized ice-cubes), or should the ice-cube be very tiny?
Where should the electrodes be positioned to separate the ions and what charge is necesarry?
Should the ions be evenly spread, and how can this be achieved?
And if it works, is it a practical diode? It would need subzero temperatures to remain solid, but it could melt by the heat dissipation of the electrical current flowing in the icy diode.

Sunday, January 01, 2012

What a year

2011 has been amazing. There were a lot of firsts and a few big changes in my life :

I bought a house. One of my resolutions for 2011 was to find a new place to live and I managed to do this. This time last year I had no idea I would now be sitting in the living room of my own house, writing this post.
It all went rather quick, first looking for a new apartment/house to rent, then deciding to buy one, followed by the search, finding one, and then all the administration and negotiating with the bank and finally, moving in and doing small construction works.

In the mean time I was a first time mentor for phpMyAdmin in the Google Summer of Code (GSoC) program. My student made phpMyAdmin compliant with Drizzle database, a MySQL fork.


Because of this mentoring, I was invited by Google to attend the GSoC Mentor Summit, which was a great experience, meeting a lot of interesting people and discussing FOSS and GSoC related issues at Google Headquarters.

This also meant I got to travel to the US, another first, and visit San Francisco and a part of California. This was an amazing experience.


For 2012 I have some goals and resolutions :

  • continue contributing to Open Source
  • be a GSoC mentor again
  • write an extensive article/blogpost about good passwords practices, or set up a website/wiki dedicated to it.
  • build a homemade transistor using ice (solid water), or write about the theoretical possibility
  • start reading again and keep a steady reading pace. I didn't manage to keep up reading in 2011.
  • further improve my house