TheFactBook

Actually, you don't need to read this to use TheFactBook

The very first lines of code which was part of TheFactBook date from 2013. However, most of it was rewritten. By the time it was vulnerable to SQL Injection so I have to learn a little about prepared statements. I found the w3schools site really helpfull. It was a page (no login was required) where you could add some text (then called Fact) and an url (then called Source) by means of an HTML form, then we stored that info into a basic table in a MySQL database, that was all.

Then I had to face a problem with SPAM, even a personal site (maybe one of the smallest sites in the whole web) has to deal with this problem. I had a number of robots whishing to post their links here and there around the site and some robots (I think so) trying to inject SQL in order to drop my tables (yes, I know it sounds really stupid, but there was 'people' trying to do it). By the time I used reCaptcha api (the omniprescent Google machine). Then I realized that every third party that I use in order to put our site more sofisticated (reCaptcha api | MathJax | JQuery) or more beautiful (Google Fonts) was hurting the privacy and the data of my reduced and loved amount of readers. It was really sad when I saw that wordpress require a lot of third party content (Google api) (for our Divagatec Blog) and trying to get rid of it is a little sloppy (I did not do that). I solved the problem (reading about simple ideas to avoid SPAM) using a hidden field in a form that most browsers would not render but automated scripts see and want it to fill (call it Url, what spam-oriented robot do not want to fill that?)

I used to use TheFactBook to store interesting information I read in articles around the web, because I procastinate a lot reading news, blogs and whatever prevents me (like you reading this) to get things done. However, having to fill that form every time I saw something interesting was really boring (a pain in the ass), so I think that it would be a great idea to have a firefox addon to do it for me. But there was a problem: I'd no idea how to start to code it. I read some information about "Getting started..." and find that it is really easy when you understand the logic behind programming (not even behind Javascript). I used addon-sdk which make the job easier. Then I think, if it is usefull for me maybe (and remotely maybe) it can be usefull for another lonely robot. So I decide to make an interface, build a login page and use Javascript, PHP and another table in the database to store user and passwords. Coding is great becuase it draws you to your computer, it takes away your sleepiness, and makes you think, ask, and do it and write it and modify it, rewriting all whitout even think to stop (all that fun condensed on plain-text files). When I finnished the addon (it takes me nearly 2 days of work, yes I'm not smarter than anyone but thankfully to StackExchange even I could) I remembered that most of the users of my projects are with Chrome, so I think "If I could build a firefox addon why I can not build a chrome extension?". Yes, the documentation for firefox-sdk is better (in my opinion) so I suffered a little when I started to write the extension nothing worked, every error was there one time and another, but at the end I found that writing a Chrome extension in the way that it was planned works better and gives you more flexibility than using firefox-sdk (it takes me maybe 3 days of work). I finished that work and think to publish the addon on firefox addons site and my novel extension in the webstore, for firefox it was easy but the webstore required to pay US$5.00 in order to give permission to publish, so I've given up, if someone wants to install the chrome extension has to trust that it was not modified in the road and trust that I'm not a bad guy trying to get access to your more precious data, but if you trust Facebook why you can't trust me?.

I made some fun working with Javascript. Making errors because I ignored the differences between Synchronous and Asynchronous, and had no idea of what a callback functions was (maybe at the moment I do not have a clear idea of what it really means, but it sounds great calling the things the way it was meant to be called). There I found something called functional programming (or something like that) that remember me of functionals in mathemathics, and the very basic idea behind that concept is the same in maths and programming (one function as an argument of another function).

Well it was a lot of introduction for a funny application, so you can taste TheFactBook too.

sat jul 4 00:15:05 COT 2015

Comentarios

Agregue usted un comentario,

Nombre:

Dirección de correo electrónico:

URL:

Mensaje:



* La dirección de correo electrónico no será publicada.




This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 Colombia License.


I'm committed to the privacy of k-lab users. Each time you access content delivered by http://www.k-lab.tk/, information like referrer, anonymized IP (255.255.X.X), date, time and requested resources are sent to a Google Analytics. This is done in order to know user preferences to adapt our content for users needs and to detect failures in the website. However, respecting your decision we don't store any of this information if you have enabled Do Not Track option in your web browser (Preferences/Privacy/Tracking/Tell Websites I do not want to be tracked). Protect your privacy.