Perl
CPAN has everything. Nearly everything and one of the modules is DBD::Sybase which connects to Microsoft SQL servers as well as Sybase ASE and iAnywhere servers, but there's a trick.
Why should I write about sessioning at all? A session is something which exists and should be as easy usable as possible. Is this the end of my blog post about sessioning?
MS-DOS basic variants had fixed default values for variables, "empty" for string variables and "0" for numbers. DATABUS (now DB/C) variables used to have unpredictable content unless initialized with an empty value and Pascal - as far as I remember - also had default values. Perl doesn't distinguish between text and numbers but it has a default value for all scalars: undef.
How to concat an array into a string? Perl is TIMTOWTDI and I could imagine two common ways - but which one is the best?
Kids are discriminated for being kids. They're not allowed to smoke, drink alcohol and use various internet offers. but writing "not for kids" on a homepage barely fulfills legal and real life requirements, software has to calculate the age based on a known date of birth.
.Sybase ASE is one of my preferred databases and the Express Edition is freeware (thanks, Sybase!) but using the OpenClient driver on a plain German Linux installation issues some error messages:
Did you find a typo in the title? No? You're right. I recently started to love the Perl Dancer Framework - and tried to write my first cronjob for a Dancer based project today.
Look at the title and you're done. No need to add a text to this post if everything is said in the title. Not really? France is too small to hold half of the world's population? No way! My computer told me that 4.294.967.296 people live in France - and computers don't fail, you know?
Some weeks ago, I wrote a post about aggregated logging by merging many "UPDATE ... SET count=count+1" SQL statements into one. But there's a problem: All of the data stored in memory is lost if the task or server crashes or if the database dies and doesn't come back until the task exists. Here is how I solved this problem.
Most people would answer "on top of my neck" but that's not always right. Actually, most heads are above their bodies but not every head has a body - which usually is no problem. Trouble starts when someone asks for a head without a body. Headhunters do (but I don't care about them, at least within this post) and web-browsers also do from time to time.
A co-worker asked recently me asked me: "Isn't Perl dead?" It isn't, many people and companies are using it, but no one talks about it.
Statistics are nice, but may also increase database load. Counting web users (page impressions) may produce a lot of UPDATE requests setting counter=counter+1. I tried to merge them using Gearman.
Vor einiger Zeit war ich auf der YAPC::EU 2012. Einige Talks wurden dort aufgezeichnet und endlich sind die Videos online- wenn auch leider von weniger Talks als erhofft. Hier sind meine Favoriten.
I visited YAPC::EU 2012 this year and some of the talks have been recorded. Finally, the recordings are online - much less than I expected, but here are my favorites out of them.
Perl doesn't care about numbers, integer or float - at least on the script level - but MongoDB does. The driver's default number detection algorithm treats floats as strings and MongoDB doesn't like to compare strings with less-than or greater-than operations.
Database load, disk, CPU and memory usage are known ressources on modern servers, but there is another one which is much more important: The I/O volume is limited and can't be raised as easy as all the others. It has no fixed limit and can't be measured (very good). It's a rare (maybe the most rare) good and shouldn't be wasted.