This made my day.
Internet
jeudi, mars 27 2008
PHP applications code quality
Par jd le jeudi, mars 27 2008, 07:57
Ah, Erich, that IS so true. I never found a well written PHP application anyway, or it was only 10 lines long.
I guess that's primarily the language fault. It permits to do a lot of stuff and does not simplify, help nor force the simplest implementation methods like MVC which should be the base in Web developement.
Well, take as example what we would do with Python and GTK+ if they were like PHP and HTML (I do not have the API reference so it will be somewhat improvised):
#finally we do not need this module I wrote everything myself
#import somemodule
def main():
# Well we want to do some printing
window = GtkWindow()
# Connect to the database without any abstraction, that sucks
db = mysql.connect()
data = db.query("select RANDOMLYTYPEDDATA from MYONLYTABLE");
while data:
# Ah, we do not have include() so we cannot reuse code
# I'm a PHP developer, I do not know functions
import somestuff
window.print(somestuff.result)
# Obviously, forgot to close db connection, etc.
if form.data.field == "hello":
# The user asked for hello, print hello
window.print("hello")
# debug
print data[0]
if form.data.anotherfield[0] == "morning":
data = db.query("select anotherdata from MYONLYDATA")
else:
sys.exit(42)
label = GtkLabel()
# Yes know we construct the view!
window.add(label)
label.print(data)
That is typical PHP code: we just take randomly typed data from our DB eng... no wait, from MySQL (remember that's LAMP!!! Not LAPP or anything else, bitches!), then we print some HTML code with data, and we do tests on environment, forms, etc, and we get back data, reprint them, do not use functions but include() multiple times thousand of files and then do not close/free anything.
It's so easy to do bad code that lot of people coming from nowhere and who did not learn anything from other languages are doing it.
Another hypothesis coming from my experiment: PHP is a language which can be developed under any OS since it's server-side executed. A link between mostly brain dead "developers" from the Microsoft world and whose from the Free Software world. A clash.
I apologize to some of my coworkers doing better PHP all the day. 
mardi, mars 18 2008
Are chickens hacking?
Par jd le mardi, mars 18 2008, 10:01
I was just taking a look at #awesome IRC stats, and I saw that there was a huge traffic 2 days ago. That was weird, so I did take a look in my log files. And yes, in fact, something happened.
At 03:26 GMT+1, suddenly, several hundreds of users joined the channel in somethng like 1-2 minutes, and then just left in same timeline. Some minutes after that, some guys began to talk with one of the real awesome user who was hanging out there.
It seems that these guys describe themselves as a "Turkey Hack Team".
I've seen a lot of hacked box in my (short) sysadmin life. Many of my customers have no idea of what security is, and this week I'm still working for a customer with an hacked box.
And one of the thing I never got was why all these "hackers" were downloading and installing IRC bot or IRC proxy on these compromised boxes. I say "hackers" with big quotes, because when I see in their command line history somethings like "rm .bash_history; logout" or "./exploit_of_dead_to_become_root" when the user they got the password has sudo right, I must laugh.
Now, I understand: it seems there are doing some sort of "parade", making all their bots joining an IRC channel and then left. That's so amazing. that I can say for sure: if I'd be a chick, I'll be stripping my shirt vehemently.
But the thing is that so far I've no idea if a turkey hack team is somehow related to chickens.
dimanche, mai 13 2007
Dotclear 2
Par jd le dimanche, mai 13 2007, 12:00
En ce bon dimanche matin, me voilà bien motivé et je m'affaire. Ayant utilisé mon blog hier, je me suis rendu compte que je n'avais toujours pas basculé vers la version 2 de Dotclear qui, même en état de beta, fonctionne très bien. C'est donc chose faîte, avec un petit thème vite modifié.
Au passage, je passe de MySQL à PostgreSQL 
jeudi, mars 8 2007
Une seule normandie pour les unir toutes...
Par jd le jeudi, mars 8 2007, 12:15
On vient de me faire passer le site Une seule Normandie, et je trouve ca énorme.
Depuis le temps que je le crie haut et fort, NON, il n'y a pas deux Normandies, il n'y en a qu'une seule, c'est la région basse-Normandie !
Je propose plutôt que l'on renomme la basse-Normandie en Normandie et qu'on renomme la haute-Normandie en autre chose, n'importe quoi, de toute facon ils n'ont ni le calvados ni le camembert !
Normands, mobilisez-vous ! :-P
dimanche, novembre 12 2006
Le retour de la Poudre Verte
Par jd le dimanche, novembre 12 2006, 18:40
Merci à Crafty, qui a acheté le nom de domaine poudreverte.org pour permettre de relancer la célèbre Poudre Verte !
jeudi, octobre 19 2006
La gloire !
Par jd le jeudi, octobre 19 2006, 13:10
Merci Matthew pour m'avoir pointé vers cette page de Wikipedia (regardez la dernière ligne) !
Pour la postérité j'ai copié une archive du site ici !
mercredi, octobre 11 2006
New personal homepage design
Par jd le mercredi, octobre 11 2006, 11:14
I guess you can see it. That changes from the classical black and white.
jeudi, août 31 2006
My metros
Par jd le jeudi, août 31 2006, 10:16
Ok, some guys are playing a new useless world, and since I'm sure I can beat them, let's try.

Aahhaha.
vendredi, août 4 2006
UTF-8 ca sux
Par jd le vendredi, août 4 2006, 23:33
Information du jour, on ne peux pas enregistrer des noms de domains UTF-8 avec des caractères composés comme lambda et cercle suscrit (vous voyez ce que je veux dire). C'est bien reconnu par l'IDN mais aucun registrar n'en veut.
Monde de merde.
vendredi, juillet 14 2006
OMG, they killed Gandi
Par jd le vendredi, juillet 14 2006, 22:41
Enfin je crois, vu que ca fait maintenant 12 jours qu'ils ne donnent pas suite à mes questions sur mon domaine full UTF-8 qui est toujours pas enregistré.
Avec Gandi v2, c'était pas le moment de jouer avec eux je crois. 
Blogging is hard today
Par jd le vendredi, juillet 14 2006, 22:34
It began with heavy spam load in comments, last month someone tried to DDoS my blog (had to block 50 IP), and now I am fighting against spam in referers.
YOU WON'T MAKE ME SILENT !!! THE WORLD WILL KNOW THE TRUTH !!!
mardi, juillet 4 2006
Comments are back
Par jd le mardi, juillet 4 2006, 14:45
I just set up this antispam method, I hope it will be efficient.
dimanche, juillet 2 2006
Λ̊.net
Par jd le dimanche, juillet 2 2006, 02:38
As a good Stargate fan, I bought Λ̊.net to play. I love Unicode.
vendredi, avril 28 2006
No more comment
Par jd le vendredi, avril 28 2006, 13:50
Due to the heavy spam load my blog is suffering, I am now obliged to close the comments section. My anti-spam filter (keywords+RBL) is not able to filter and catch everything. Trackbacks are still available.
Sad 
dimanche, avril 9 2006
Time Management for System Administrators
Par jd le dimanche, avril 9 2006, 00:16
I just found this book.
Amazingly enough, if you read this book, your entire life will be transformed instantly and all of your problems will be fixed. You'll be better looking, too!
I should read it...
dimanche, avril 2 2006
Deux ans...
Par jd le dimanche, avril 2 2006, 23:27
C'est juste pour signaler les deux ans d'existence de ce blog aussi utile qu'indispensable, que vous lisez bien trop souvent, et auquel il est toujours bon de se référer dans les soirées branchées.
Je vous gratifie donc d'une nouvelle citation de ma personne à placer en toute circonstance:
De toute facon il m'est toujours apparu clair que la mort de Barry White annoncait la fin de la civilisation occidentale telle que nous l'avons sublimée au 20ème siècle.
dimanche, mars 26 2006
L'Internet est en panne
Par jd le dimanche, mars 26 2006, 15:44
Wahou, toi aussi tu te rends compte de bon dimanche que ton Internet ne marche presque plus ? Tu te dis que y a un problème, que tu vas encore râler sur ton fournisseur d'accès parce qu'ils offrent vraiment un service pourri.
Non, rassure toi: ils n'y sont pour rien, et tu as de la chance car tu n'as pas été prévenu (et reveillé) par téléphone de cette catastrophe mondiale.
Oui, car pour la seconde fois ce mois-ci, RedBus Interhouse est tombé ! Pour ceux qui ne connaissent pas, RedBus est un centre d'hébergement (on appele ca des datacenters dans notre jargon) où on sont hébergés des milliers de serveurs et de routeurs qui font que l'Internet francais fonctionne bien. C'est un des plus gros centre de France, à Courbevoie (92), et un point majeur des interconnexions entre opérateur Internet/Télécom.
Ce genre de centre est bien sûr super équipé niveau sécurité, on ne te laisse rentrer qu'après avoir scanné ton oeil dans un sas de 1 mètre carré, en parlant avec un miroir qui te dit de te regarder droit dans les yeux. Evidemment, ils ont des gros climatiseurs, du gaz anti-incendie FM200™, des onduleurs et des groupes éléctrogènes pour tenir des heures et des heures.
Oui, mais voilà, ce dimanche, à 11h, tout est tombé, comme cela été déjà arrivé il y a 3 semaines, avec deux coupures de 30min-1h ! Et blam, coupure de courant à nouveau ce dimanche. Le truc impossible. Et en ce moment, le courant est de nouveau coupé depuis 14h30 et toujours pas rétabli au moment où j'écris ces lignes.
J'attend avec impatience l'explication que l'on aura dès cette semaine. Il y a 3 semaines, l'explication pouvait être paraphrasée en "tiens, Régis, tu veux pas éteindre la lumière ?", "c'est le gros bouton rouge là ?". Evidemment, on a vu, dans les heures qui ont suivi, le défilé d'admin en panique. On m'a même conté l'histoire d'un admin sortant d'un taxi en courant, l'ordinateur portable allumé à la main, avec le câble série qui pendait pendant que son collègue réglait le chauffeur !
Mais alors, que vont-ils inventé cette fois-ci ? Qu'est ce que Régis va bien pouvoir avoir fait ?
Du coup, plus d'Internet, ca fait une bonne excuse pour aller se promener.
Update du lundi: des infos sur Régis chez OVH.
mardi, février 7 2006
Obfuscate p2p
Par jd le mardi, février 7 2006, 17:43
Erich Schubert wrote about p2p obfuscation/encryption, arguing that it's bad.
Eric, according to some french media (so it is still a rumor for now), at least one french DSL provider (not the leader, the second one) already set up QoS limitation for non-standard ports, prioritizing usage of http/smtp/imap.
Now, customers of this ISP should ask themselves about setting up tunnels on port 80/tcp to route all their traffic outside... 
dimanche, janvier 8 2006
I am happy !!!
Par jd le dimanche, janvier 8 2006, 20:43
|
Your Social Dysfunction: Happy You're a happy person - you have a good amount of self-esteem, and are socially healthy. While this isn't a social dysfunction per se, you're definitely not normal. Consider yourself lucky: you walk that fine line between 'normal' and being outright narcissistic. You're rare - which is something else to be happy about. |
||||
|
||||
|
Take this quiz at QuizGalaxy.com
Please note that we aren't, nor do we claim to be, psychologists. This quiz is for fun and entertainment only. Try not to freak out about your results.
|
« billets précédents - page 1 de 2

