DasGenie: !Scrap
« September 2004 | Main | November 2004 »

Samstag, 30. Oktober 2004

brandeins kommt zur Besinnung:

"Liebe Besucher von brandeins-Online,

zwei Wege gibt es, die ganz sicher ins Abseits führen: nichts probieren. Und: nicht korrigieren, wenn sich ein Experiment als falsch herausgestellt hat.

Deshalb werden wir ab sofort unseren online-Auftritt wieder ohne Login für alle Besucher öffnen: Die Zugangsbeschränkung z B. für das Archiv war eine Idee, die zeitgemäß schien - letztlich aber nicht zu der Offenheit von brand eins passt.

Seien Sie also willkommen in der bunten Welt von brand eins - allein die jeweils aktuelle Ausgabe gibt es künftig in voller Länge erst einmal nur am Kiosk oder, für Abonnenten, mit der Post. Sie geht erst zum Erscheinungstermin der nächsten Ausgabe als komplette Volltextausgabe ins Archiv.

mit herzlichen Grüssen
Gabriele Fischer
"

Lang hat's gedauert. Seit März waren die Artikel verschlossen. Ich scheine wohl nicht der einzige Leser gewesen zu sein, den sie verloren hatten...

[Via vowe dot net]

Samstag, 30. Oktober 2004, 15:13 | Permalink | Comments (0)

Mittwoch, 13. Oktober 2004

The PHP WTF

Enjoy examples of typical PHP. Sounds cynical, but I've seen many Open Source PHP Projects and the examples just match them. Have fun, or not...
http://thephpwtf.com/
Although the author of this blog tries to correct things and educate (which is a very good thing) there is still much which is to be attributed to PHP as such (e.g. the first entry of the blog).
Mittwoch, 13. Oktober 2004, 09:51 | Permalink | Comments (0)

Montag, 4. Oktober 2004

PHP ROT(FL)-13

"Does anyone have a good PHP -> HTML converter thingy that is not written in PHP?"

here you go...
function encryptStr($string,$case_match="") {
   $replace=array("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","0","1","2","3","4","5","6","7","8","9");
   if ($case_match) {
      $shift_array=array(
         "a"=>"n",
         "b"=>"o",
         "c"=>"p",
         "d"=>"q",
         "e"=>"r",
         "f"=>"s",
         "g"=>"t",
         "h"=>"u",
         "i"=>"v",
         "j"=>"w",
         "k"=>"x",
         "l"=>"y",
         "m"=>"z",
         "n"=>"a",
         "o"=>"b",
         "p"=>"c",
         "q"=>"d",
         "r"=>"e",
         "s"=>"f",
         "t"=>"g",
         "u"=>"h",
         "v"=>"i",
         "w"=>"j",
         "x"=>"k",
         "y"=>"l",
         "z"=>"m",
         "A"=>"N",
         "B"=>"O",
         "C"=>"P",
         "D"=>"Q",
         "E"=>"R",
         "F"=>"S",
         "G"=>"T",
         "H"=>"U",
         "I"=>"V",
         "J"=>"W",
         "K"=>"X",
         "L"=>"Y",
         "M"=>"Z",
         "N"=>"A",
         "O"=>"B",
         "P"=>"C",
         "Q"=>"D",
         "R"=>"E",
         "S"=>"F",
         "T"=>"G",
         "U"=>"H",
         "V"=>"I",
         "W"=>"J",
         "X"=>"K",
         "Y"=>"L",
         "Z"=>"M",
         "0"=>"5",
         "1"=>"6",
         "2"=>"7",
         "3"=>"8",
         "4"=>"9",
         "5"=>"0",
         "6"=>"1",
         "7"=>"2",
         "8"=>"3",
         "9"=>"4"
      );
   } else {
      $shift_array=array(
         "a"=>"N",
         "b"=>"O",
         "c"=>"P",
         "d"=>"Q",
         "e"=>"R",
         "f"=>"S",
         "g"=>"T",
         "h"=>"U",
         "i"=>"V",
         "j"=>"W",
         "k"=>"X",
         "l"=>"Y",
         "m"=>"Z",
         "n"=>"A",
         "o"=>"B",
         "p"=>"C",
         "q"=>"D",
         "r"=>"E",
         "s"=>"F",
         "t"=>"G",
         "u"=>"H",
         "v"=>"I",
         "w"=>"J",
         "x"=>"K",
         "y"=>"L",
         "z"=>"M",
         "A"=>"n",
         "B"=>"o",
         "C"=>"p",
         "D"=>"q",
         "E"=>"r",
         "F"=>"s",
         "G"=>"t",
         "H"=>"u",
         "I"=>"v",
         "J"=>"w",
         "K"=>"x",
         "L"=>"y",
         "M"=>"z",
         "N"=>"a",
         "O"=>"b",
         "P"=>"c",
         "Q"=>"d",
         "R"=>"e",
         "S"=>"f",
         "T"=>"g",
         "U"=>"h",
         "V"=>"i",
         "W"=>"j",
         "X"=>"k",
         "Y"=>"l",
         "Z"=>"m",
         "0"=>"5",
         "1"=>"6",
         "2"=>"7",
         "3"=>"8",
         "4"=>"9",
         "5"=>"0",
         "6"=>"1",
         "7"=>"2",
         "8"=>"3",
         "9"=>"4"
      );
   }
   for($i=0;$i<strlen($string);$i++) {
      if (in_array(substr($string,$i,1),$replace)) {
         $newstring.=$shift_array[substr($string,$i,1)];
      } else {
         $newstring.=substr($string,$i,1);
      }
   }
   return $newstring;
}
[via The Daily WTF]
Montag, 4. Oktober 2004, 21:40 | Permalink | Comments (1)

Address Book - Switch first and last name Applescript

Today I will migrate my father from an old pc to an 20'' iMac G5, yeah. First thing was to get his addresses from Outlook into Address Book. After having found no decent export format in Outlook, I downloaded Thunderbird which imported the addresses nicely and could write an LDIF export which Address Book can import. So far so good. Sadly my father did fill in the Outlook name Form "Last Name - First Name" which as far as I have seen the UI is a likely error. To correct this I wrote a small Applescript that switches first and last name of the current selection:

-- place in "/Library/Scripts/Address Book Scripts/"

tell application "Address Book"
    
set mylist to selection
    
repeat with this_person in mylist
        
set first_name to first name of this_person
        
set last_name to last name of this_person
        
set first name of this_person to last_name
        
set last name of this_person to first_name
    
end repeat
end tell

Have Fun! And be aware that the Address Book updates the UI a little bit lazily...

Montag, 4. Oktober 2004, 14:10 | Permalink | Comments (2)

Freitag, 1. Oktober 2004

Joel on IT Conversations

I finally finished listening to Doug Kaye's interview with Joel Spolsky.
First of all let me say that I really enjoy Joel's column Joel on Software, and find most of it's articles very enlightening and agreeable. Having this out of the way let's get to the things I found interesting:
  • Joel mentions having been among 12 product managers of the original Excel team which had about 50 Developers at that time. That seems a lot to me and IMHO explains why Microsoft Products come up so crappy. He is talking about the original Excel here not the feature overladen beast it is now.
  • Joel's commentary suggest Microsoft now is in an over bureaucratic Titanic-esque employer, which is consistent with this comparison. Maybe Microsoft really has seen its peak and demise is near... (I can be so naive :-) )
  • Are you standing? FogBUGZ is written in VBScript. What a choice. Moreover Joel calls a program that can convert their VBScripts into PHP a "compiler".
Freitag, 1. Oktober 2004, 16:19 | Permalink | Comments (0)

Add Icon Droplet

sips is very nice, but on the other hand, adding icons per drag and drop is nicer, so here you go with your applescript editor:

-- save in Script Editor as Application
-- drag files to its icon in Finder

on open some_items
    
repeat with this_item in some_items
        
try
            addicon_and_save
(this_item)
        
end try
    
end repeat
end open

to addicon_and_save(this_item)
    
try
        
tell application "Image Events"
            
launch
            
set this_image to open this_item
            
save this_image with icon
            
close this_image
        
end tell
    
end try
end addicon_and_save

macosxhints has a nice Drag-and-drop script to quickly resize any image which brought this possibility to my attention.
Freitag, 1. Oktober 2004, 01:14 | Permalink | Comments (2)