Best of Web #7

best of web - runde 7Today it is once again time for another round of “Best of Web”. This week I have a few more links on the hand, I would like to share with you. Overall, it comes back this week to some technical topics – good for geeks and nerds among you, rather poor for lovers of more “lighter fare”. Among others, today is about compilers, the history of Windows, some web design basics and a bit of image recognition in C#. I hope there is one or the other interesting article for everyone.
As always – who has more link tips, is hereby invited to send me these for one of the rounds of my “Best of Web” series. And now have fun with my recommendations of the week.
Quick introduction to compiler construction
On TechPro Tristan McNab explains […]

20 Dropbox tools you should know

When it comes to online storage and sync, then Dropbox is my number 1 and because I’m pretty sure I’m not alone with this sight, below there is a collection of 20 tools which will help you to realize the full potential of your Dropbox.
 
 
dropplets
#1 – dropplets.com / Blog with Dropbox
With dropplets your Dropbox becomes a blogging platform. After the “installation” your Dropbox behaves like a web server.
New articles can be written in the easy to learn Markdown language and published by simply save them in your Dropbox. The whole thing is quick, easy, and also looks quite chic.
 
 
calepin
#2 – calepin.co / Publishing by Dropbox
Calepin.co is the second blog system in our listing. Also Calepin supports the markup language “Markdown” and allows […]

Benchmark: strtotime() vs DateTime vs getTimestamp in PHP

Recently I wrote about how one can implement date comparison in PHP. In the article I presented two approaches. Firstly, using the strtotime() method and another with the DateTime class.
Then, in the comments on the german division of this blog, it was pointed out that the strtotime() variant is probably faster. Because I wasn’t sure about this, I decided to make a small performance test and share the results with you in this article.
How did I test the performance?

Since the question aims on strtotime() vs. DateTime, the DateTime class is contrary to the strtotime() function. So because DateTime class offers more functionality, I had first to create the DateTime object and then get the timestamp of it, because the strtotime function gives a timestamp as return value and I wanted to compare the time needed to generate the identical output.
As input I have taken a date without a custom time […]

How to compare dates in PHP

php_date_compareHow to actually compare 2 dates in PHP with each other? The question sounds easier than it is.  The first thought that usually comes is the following. We store both dates as strings and compare them.
Preliminary

<?php
$date1 = "2012-1-12";
$date2 = "2011-10-12";

if ($date1 > $date2)
echo "$date1 is newer than $date2";
else
echo "$date1 is older than $date2";
?>

Output:

2012-1-12 is newer than 2011-10-12

At first glance this seems to be a workable solution. But what if the two data is in a different format?

<?php
$date1 = "12-1-12";
$date2 = "2011-10-12";

if ($date1 > $date2)
echo "$date1 is newer than $date2";
else
echo "$date1 is older than $date2";
?>

Output:

12-1-12 is older than 2011-10-12

Now the date in 2012 is declared to be older than the date in 2011, which is of course wrong. However, from PHP’s point of view, this behavior is correct, because two strings were […]

How to execute Perl scripts in Notepad++

notepad++_perl_executeA few days ago I already described how to set up the Eclipse development environment for usage with Perl scripts. If you don’t want to use a sledgehammer to crack a nut,  you can also use the Notepad++ editor to relatively comfortably write Perl scripts.
Besides syntax highlighting and intellisense aka auto completion, Notepad++ also offers the possibility to execute Perl scripts directly from the editors interface. However, therefore a one-time setup is necessary, which I want you to briefly explain below.
Step 1 – create test scripts:
perl-skripte_in_npp_ausführen_1  perl-skripte_in_npp_ausführen_2
To be able to check if you have set up everything correctly later, you should definitely first create a small Perl script and save it. Important: Only stored scripts can be executed afterwards. So always […]