This will replace theSteveBlog as soon as I get around to figuring out how to embed WordPress stuff better, and after I move all my old posts.
Until then, enjoy the fun jQuery stuff, and use Linux!
Cheers!
This will replace theSteveBlog as soon as I get around to figuring out how to embed WordPress stuff better, and after I move all my old posts.
Until then, enjoy the fun jQuery stuff, and use Linux!
Cheers!
I used to use $newValue = addslashes($newValue) when inserting data into MySQL and $currentValue = stripslashes($currentValue) when pulling it out. Then a week or so ago, I discovered mysqli_real_escape_string().
Seriously, start using it because then you don’t have to ever do $currentValue = stripslashes($currentValue) when pulling data out.
Here’s the procedural way of doing it (just took it right out of the docs):$link = mysqli_connect("localhost", "my_user", "my_password", "world");
$newValue = mysqli_real_escape_string($link, $newValue);
And here’s the object oriented way of doing it (less verbiose and just as clear — I prefer this method).$db = new mysqli("localhost", "my_user", "my_password", "world");
$newValue = $db->real_escape_string($newValue);
The only thing that bothers me is that there is no reason they couldn’t just have called the function mysqli_escape (.. crossed out just incase.) I mean really, that’s one of those functions that there is no way out of having to use it (at times) every line for 20 lines of code.
For better or for worse, I am far more proficient in PHP than Python. However, when it comes down to syntax, I would much prefer to write in Python.
I love the simplicity of Python; I tend to make fewer mistakes with its eye-friendly syntax. Although, at this point, I am so familiar with PHP’s C-like syntax, that I can sometimes write 100+ lines of code without a single syntax error (and I don’t use your silly error-correcting IDEs, but vi with only basic syntax highlighting on the command line).
Anyways, I have been writing several hundred lines of PHP daily for the past week or so, and I just can’t get over how amazing PHP’s official documentation is over Python’s.
When I am trying to figure out how to do something new in Python, especially if it involves using libraries I am not familiar with already, I have to go through all kinds of hell googling around to find decent documentation on it. However, with PHP, just type in php.net/some_function or php.net/variables or whatever, and you not only get what you are looking for, but also a very smart list of similar functions / information as what you are viewing.
If I could go back and teach my 13yr old self how to code again, I would use Python because it is sane, scalable, and very efficient. But if I needed to assign my 13yr old self a project to complete, I would have him use PHP, because he could actually figure out how to do it.
Recently I wrote this little script to send a text message to my phone using my Gmail account. It uses a python library called libgmail. (Debian / Ubuntu package: python-libgmail should do the trick).
My cell carrier is Alltel — you’ll have to change myCellEmail to match that of your carrier (list provided courtesy of wikipedia).
#!/usr/bin/env python
import libgmail
stuff = libgmail.GmailAccount(“me@gmail.com”, “password”)
myCellEmail = “1234567890@message.alltel.net”
stuff.login()
msg=libgmail.GmailComposedMessage(myCellEmail, “”, “Hello World! From python-libgmail!”)
stuff.sendMessage(msg)
Cheers!
I snapped this photo today of the elevation of the Host at Immaculate Conception in Cleveland (map). Today was the Patronal feast of the parish, and they had a beautiful liturgy in the usus antiquior with two priests as subdeacons.
I have often wondered why Advent, unlike Lent, is not considered a time of fasting in the Roman Rite. For most Eastern Catholics, it is like a mini-Lent in many respects — after all, we are preparing for the coming of our Lord.
As good as fasting is, perhaps it is for the best. I can relate to Flannery O’Connor who said in a letter to a man reviewing one of her novels,
“I have 50 or 60 pages on the [new] novel but I still expect to be a long time at it. It’s a theme that requires prayer and fasting to make it get anywhere. I manage to pray but am a very sloppy faster.” (The Habit of Being, p. 59)
So in the spirit of a Western Advent, here is a good drinking song written by everyone’s favorite militant Catholic, Hilaire Belloc. This is from his excellent little novel, “The Four Men.” There are several other good drinking songs scattered througout that book along with the notation.
[Audio]
Noël, Noël, Noël, Noël
A Catholic tale have I to tell,
and a Christian song have i to sing,
while all the bells in Arundel ring
I pray good beef and I pray good beer
this holy night of all the year
but I pray detestable drink to them
that give no honor to bethlehem
May all good fellows that here agree
drink audit ale in heaven with me
and may all my enemies go to hell,
Noël, Noël, Noël, Noël
May all my enemies go to hell,
Noël, Noël
I just received an early word on funeral arrangements for Giselle Updegraff:
Wake:
Friday, Nov 21, 1-3pm & 5-9pm
Ritondaro funeral home, 126 South Street, Chardon, OH
Funeral: Saturday, Nov 22, 11am
St. Helen Church, Newbury OH
Also, there will be a viewing at St. Helen’s before the funeral from 9-10:45am
Edit (19 Nov 08 11:45am): More info has been posted here.
Requiem æternam dona eis, Domine;
In memoria æterna erit justus,
ab auditione mala non timebit.
Domine, Jesu Christe, Rex gloriæ,
libera animas omnium fidelium defunctorum
de pœnis inferni et de profundo lacu.
Libera eas de ore leonis,
ne absorbeat eas tartarus,
ne cadant in obscurum;
sed signifer sanctus Michæl
repræsentet eas in lucem sanctam,
quam olim Abrahæ promisisti et semini ejus.
Hostias et preces tibi, Domine,
laudis offerimus;
tu suscipe pro animabus illis,
quarum hodie memoriam facimus.
Fac eas, Domine, de morte transire ad vitam.
Quam olim Abrahæ promisisti et semini ejus.
In my language studies, I spent some time translating an Old English text describing different illnesses along with their causes and symptoms. I came across one that I cannot remember the Old English word for (I believe it was right out of my Old English grammar book, so I’ll look it up when I have it on hand), but the Latin word for it was melancholia.
There were said to be four types of liquids that do much to determine personality type. These fluids come from your liver and are stored in your gallbladder. Melancholia was believed to be the result of too much “black bile,” one of these four fluids. What modern science has done to prove or disprove these theories I do not know, but we now call melancholia “clinical depression.”
I have never experienced depression. I have experienced intense moments of sadness, perhaps even prolonged moments of sadness, but never depression as it has been described to me. This afternoon a friend called to tell me that an old friend, a beautiful young lady, committed suicide last night by jumping out of a seven story window. My mind keeps returning to Dante’s seven story mountain in Purgatio.
Anyways, I would like to propose the reading of this short excerpt of Chesterton’s Orthodoxy from chapter 3 entitled “The Suicide of Thought.” Of course he comes across rather harsh on the subject for those who may be mourning the death of a loved one due to suicide. However, Chesterton is truly more harsh in his praise of life than his condemnation of death.
No one doubts that an ordinary man can get on with this world: but we demand not strength enough to get on with it, but strength enough to get it on. Can he hate it enough to change it, and yet love it enough to think it worth changing? Can he look up at its colossal good without once feeling acquiescence? Can he look up at its colossal evil without once feeling despair? Can he, in short, be at once not only a pessimist and an optimist, but a fanatical pessimist and a fanatical optimist? Is he enough of a pagan to die for the world,and enough of a Christian to die to it? In this combination, I maintain, it is the rational optimist who fails, the irrational optimist who succeeds. He is ready to smash the whole universe for the sake of itself.
I put these things not in their mature logical sequence,but as they came: and this view was cleared and sharpened by an accident of the time. Under the lengthening shadow of Ibsen, an argument arose whether it was not a very nice thing to murder one’s self. Grave moderns told us that we must not even say “poor fellow,” of a man who had blown his brains out, since he was an enviable person, and had only blown them out because of their exceptional excellence. Mr. William Archer even suggested that in the golden age there would be penny-in-the-slot machines, by which a man could kill himself for a penny. In all this I found myself utterly hostile to many who called themselves liberal and humane. Not only is suicide a sin, it is the sin. It is the ultimate and absolute evil, the refusal to take an interest in existence; the refusal to take the oath of loyalty to life. The man who kills a man, kills a man. The man who kills himself, kills all men; as far as he is concerned he wipes out the world. His act is worse (symbolically considered) than any rape or dynamite outrage. For it destroys all buildings: it insults all women. The thief is satisfied with diamonds; but the suicide is not: that is his crime. He cannot be bribed, even by the blazing stones of the Celestial City. The thief compliments the things he steals, if not the owner of them. But the suicide insults everything on earth by not stealing it. He defiles every flower by refusing to live for its sake. There is not a tiny creature in the cosmos at whom his death is not a sneer. When a man hangs himself on a tree, the leaves might fall off in anger and the birds fly away in fury: for each has received a personal affront. Of course there may be pathetic emotional excuses for the act. There often are for rape, and there almost always are for dynamite. But if it comes to clear ideas and the intelligent meaning of things, then there is much more rational and philosophic truth in the burial at the cross-roads and the stake driven through the body, than in Mr. Archer’s suicidal automatic machines. There is a meaning in burying the suicide apart. The man’s crime is different from other crimes–for it makes even crimes impossible.
About the same time I read a solemn flippancy by some free thinker: he said that a suicide was only the same as a martyr. The open fallacy of this helped to clear the question. Obviously a suicide is the opposite of a martyr. A martyr is a man who cares so much for something outside him, that he forgets his own personal life. A suicide is a man who cares so little for anything outside him, that he wants to see the last of everything. One wants something to begin: the other wants everything to end. In other words, the martyr is noble, exactly because (however he renounces the world or execrates all humanity) he confesses this ultimate link with life; he sets his heart outside himself: he dies that something may live. The suicide is ignoble because he has not this link with being: he is a mere destroyer; spiritually, he destroys the universe. And then I remembered the stake and the cross-roads, and the queer fact that Christianity had shown this weird harshness to the suicide. For Christianity had shown a wild encouragement of the martyr. Historic Christianity was accused, not entirely without reason, of carrying martyrdom and asceticism to a point, desolate and pessimistic. The early Christian martyrs talked of death with a horrible happiness. They blasphemed the beautiful duties of the body: they smelt the grave afar off like a field of flowers. All this has seemed to many the very poetry of pessimism. Yet there is the stake at the crossroads to show what Christianity thought of the pessimist. (from G.K. Chesterton’s Orthodoxy, chapter 3)
Today I remembered an opera in Vienna (Austria) at the Opera House I went to with my friend Dan Spagnola.
Since the hostel we were staying at took our international student IDs as collateral, we weren’t able to get student discounted seats. We stood in line until just before the opera started, and we got horrible nosebleed seats. I could only see the stage if I stood on my toes, but it was still an exhilarating performance, albeit uncomfortable.
Anyways, I understood very little of the opera on my own, as it was in some Milanese-Italian dialect that no one knows except people from Milan. But there was one part that struck me, and I only understood it at the time because they had German & English subtitles on these little hard-to-read screens (pretty nasty translations to English, I might add).
A couple weeks later when I was back in Rome, I was able to find the text of the play, and found that little part very difficult to translate. I even asked a couple native Italian speakers for help, and they weren’t able to translate a couple of words. So I hit the books, and needless to say, I was able to translate this beautiful little Italian dialect that no one knows or cares about. Luckily, I wrote all this down a couple years ago, and am now sharing it with the interwebz:
The play is “Simon Boccanegra” by Giuseppe Verdi, and was written in 1850′s. This is one of the last lines of the Opera, the tragic death of this one dude inspires this other guy that is in love with his daughter to exclaim upon his death:
CORO:
Sì – piange, piange, è vero,
Ognor la creatura;
S’avvolge la natura
In manto di dolor!
Most of this is really obvious either because the words are very similar or the same as either standard Italian or Latin (or both). Here were a couple tough ones though:
“Ognor” is the Florentine (standard Italian) equivalent of ogni ora (an old word). The literal definition of “ogni ora” is “every hour.”
Another weird one is actually “la creatura.” In Latin and Italian “creatura” is simply “creature.” But that doesn’t really make sense here. As it turns out, “la creatura” here means something made in God’s image, or something that is loved — a good translation might be, “the human heart.”
The rest is fairly obvious and simple. Here’s my translation, since an English translation of this play doesn’t seem to exist outside of the Opera House in Vienna:
My translation:
“CORO:
Yes – it cries, it cries, it is true,
every hour the human heart;
wraps its nature
In a mantle of sorrow”
Edit: I was just thinking my Latin sucked worse back then than it does now.. in Latin, “creatura” can also sometimes mean “servant,” so perhaps the second line here may be translated as “every hour the servant,” to emphasize the human condition as relatively powerless and merely “creature-like.”
I have not posted in here for quite awhile, but I intend to start up again at least once this week.
I am currently a post-baccalaureate student at Cleveland State University‘s Fenn College of Engineering perusing a degree in Computer Engineering. I have not spent a great deal of time considering what direction to take this blog as far as content, but you can be sure it will involve Free Software, the Catholic Church, and alcoholic beverages.