"[...] If you try to solve the second kind of ignorance [fear or lack of interest] with a manual or a PDF or a blog post or even a long infomercial, you're going to fail."

Read more in Seth Godins article the Two kinds of "don't know".
Portfolio.com is running a story named Google's Secret Formula with a good flash animation explaining how Google works. It's an interesting story, especially since Google now serves more queries then Microsoft and Yahoo combined...
I am rather allergic to screensavers myself, but if you are into them, check out PolarClock:

polarclock.png


















Available at pixelbreaker for both Mac and PC.


The web chat I am running has support for four public webcams, visible to everyone. The idea is that a user can occupy one slot for a maximum of five minutes. Unfortunately, as with any public system, there will always be those who misbehave. Therefore, when making the new webcam system, one of the new key features will be improved ban handling as well as user reporting abilities. This articles covers the latter.

What we came up with is a powerful, yet simple to use report system. This includes one-click reporting, data gathering and automatic snapshots of the webcam in question. After all, we want to see what the user saw when he pressed the report button.

In short, when a user sees any suspicious activity, he or she can simply click the report button. A snapshot is then generated and information such as nicknames and IPs of both reporter and the user being reported is collected.

Server setup
I am using two servers, one for the chat itself and one for the Flash Media Server. Flash Media Server, or FMS, is the software which makes it possible for us to broadcast webcams and streaming video in Flash. Both servers are running a web server with PHP installed and thanks to AmfPHP we can call PHP scripts on the chat server straight from FMS.

Requirements
Everything must be made server-side, for security reasons the client itself cannot generate the snapshot. The reports will be stored in the mySQL database on the main server, Chat.

Known problems
Flash Media Server cannot generate snapshots, only record video into Flash Live Video (.flv). This means we have to run FFMPEG (a free media encoder) from shell to convert FLV to Snapshots (.jpg).

Key players, or the system in short
The system consists of three major players. On the cam server we've got Flash Media Server and the PHP script generateJPG.php. generateJPG.phps sole mission is to do on-the-fly conversions between the Flash Live Video (.flv) and JPEG. On the chat server we've got the PHP function continueReport() which stores everything in the database. continueReport() is reachable from FMS thanks to AmfPHP.

The report life cycle simplified
When a user presses "Report" a function is executed in our Flash Media Server application. FMS records a one second long video clip which it stores locally for generateJPG.php. It then gathers the needed information (IP numbers, nicknames etc.) which it passes onto continueReport() on the chat server. continueReport() then downloads the snapshot in question using generateJPG.php and stores the JPG on disk, and the rest in our mySQL database.

In reality
However, the simplified version  does not show connections and request replies between the scripts. In reality, this is what happens:

   1. The user clicks on the report button, thus making a call to FMS.
   2. FMS starts recording and stops, by timer, after 1 second.
   3. FMS (using AmfPHP) sends a request to continueReport() and waits for a "OK" reply.

         1. continueReport() receives the request and
             makes a call to PHP on server Cam for a snapshot.

               1. Cam's PHP run the shell program FFMPEG, thus
                   generating a .jpg snapshot which is echos back to Chat.

         2. continueReport(), still running, now has the image as a
             string and starts by saving the report data (IPs etc) in the
              mySQL database. After that, it then stores the image on the disk.

         3. continueReport(), which now is done with its operations,
             send the "OK" reply to  FMS.

   4. FMS removes the temporary stream saved in step 2

To be continued...
And there you have it, connections and request replies included. I haven't had the time to explain and comment the source code yet, but when I do I will add another articles with at least the FMS source and a FFMPEG guide. If you are really interested, contact me and I'll hook you up.
Here is something I didn't know: Amfphp - the flash remoting class for PHP - version 1.9 is in beta 2 since a while back. According to this blog post it's ridiculously faster. From 50 to 200 times.

If you are using Amfphp, read more on http://www.5etdemi.com/ or download it straight away.
Darren Lee of fczone.com recently released a Flash Media Server IDE for eclipse/Flex builder. The plugin enables you to "build Flash Media Server applications alongside flex or just on its own in eclipse.". Amongst other things, the plugin includes:

  • Code Completion
  • Output Console (no more need for flash media server admin console)
  • Automatic error checking on save, much eliminating the need to dig through logfiles to find simply type errors.
  • Auto inserts
  • Import and converts AS2 Classes
And much much more. While I haven't been able to try it out yet (I'm connected by 3G mobile internet from the archipelago of Stockholm) I must say it looks really great. The only downside is that it doesn't support output console when working in os x. But it's a early beta so I hope that will change one day.

If you are an FMS developer, make sure you watch the ScreenCast and download it.
Generally Movable Type 4 has nice URLs. However this is not the case for trackbacks and tag-clouds. This article describes how you clean them up, step by step using htaccess and mod_rewrite. I will not explain either htaccess or mod_rewrite but rather assume that you are familiar with them. If you are not, google them.

By default, the URLs look like this:
Trackback: /cgi-bin/movabletype/mt-tb.cgi/<entry id>
Tag cloud: /cgi-bin/movabletype/mt-search.cgi?tag=<tag>&blog_id=<blog id>

This is not beautiful. The idea of this article is to transform them into this:

Trackback: /lessons-learned/trackback/13/
Tag cloud: /lessons-learned/tag/<blog id>/<tag>

Getting started: HT Access and mod_rewrite
If you haven't got one already, create a .htaccess file in the parent folder of movable type. That is, if movable type is in:

> /lessons-learned/ (public_html/lessons-learned)

The .htaccess should go into / (public_html/). If you are unfamiliar with htacces google it. Place the following two lines in it:

RewriteEngine on
RewriteRule ^lessons-learned/trackback/([0-9]+)[\/]?$ cgi-bin/movabletype/mt-tb.cgi/$1 [L]
RewriteRule ^lessons-learned/tag/([0-9]+)/(.*) cgi-bin/movabletype/mt-search.cgi?tag=$2&IncludeBlogs=$1 [L]

Make sure you copy them as three lines, starting with RewriteEngine, RewriteRule and RewriteRule. These lines assume two things, that your base url for movable type is lessons-learned and that your CGI files are in cgi-bin/movabletype. The first line enables mod_rewrite, google it if you aren't familiar with it, the two latter tells Apache to forward matches on URL lessons-learned/trackback and lessons-learned/tag to the matching .cgi-files.

What it does is to invisible convert lessons-learned/trackback/<entry-id> to cgi-bin/movabletype/mt-tb.cgi/<entry-id>

Save your file, and test it by going to:
http://www.yourdomain/your-mt/trackback/1 (replace 1 with a existing entry id). If you get a 500 Interal Server Error, you probably haven't got access to mod_rewrite. You should get the same page you would get for:

http://www.yourdomain/cgi-bin/movabletype/mt-tb.cgi/1

Getting Movable Type to print the new urls in templates.
We've now done half the work. The new URLs work, but if Movable Type doesn't print them they are of no use. Log in on Movable Type and choose Design -> Templates. 

Open the
Trackback template (Click "Template Modules" then "TrackBacks")
Replace "<$MTEntryTrackbackLink$>" with "/lessons-learned/trackback/<$MTEntryID$>"

Edit template "Tags", change: "<$MTTagSearchLink$>&amp;IncludeBlogs=<$MTBlogID$>" to  "/lessons-learned/tags/<$MTBlogID$>/<$MTTagName$>".

Then edit template "Sidebar - X Column Layout" (which ever you use), change: "<$MTTagSearchLink$>&amp;IncludeBlogs=<$MTBlogID$>" to  "/lessons-learned/tags/<$MTBlogID$>/<$MTTagName$>".

Then republish your site. All in all, your trackback/tag links should be cleaner. Those a little more high-tech might want to edit lib/MT/Template/ContextHandlers.pm (and the corresponding functions) to make sure MT reports the correct URLs from the start, not just in the templates. But we'll save that for a rainy day..
Under min tid på Hyper Island skapade jag en PDF med allmäna tips för presentationer. Ta dem för vad dem är, nämligen tips och tricks. Ingen bibel. Mycket i listan är självklarheter, men dem tål att tänkas på ändå.

Allmänna tips

  • Våga vara tyst
    Att vara tyst är ett av de effektivaste verktygen du kan använda dig av

  • Försök att inte stressa
    Även om du känner att ämnet är uttjatat och bara vill bli klar så snabbt som möjligt så betyder det inte att dina åskådare tycker det. För dem är det intressant; de vill höra vad du har att säga

  • Tala sakta
    Även om du känner att du pratar i ultrarapid betyder det inte att du gör det. Med största sannolikhet pratar du ändå för snabbt. Om din presentation tar 10 minuter framför spegeln går den på 6-7 i verkligheten.

  • Öva, Öva och glöm inte att öva
    Låt någon höra på en repetition och fråga vad dem tycker. Detta ger dig både feedback och erfarenhet.

  • Gå medan du över på talet
    Att röra dig samtidigt som du pratar ökar syrehalten i blodet och gör att du lär dig mera

  • Lär er bolla inom gruppen
    Om någon tappar bort sig kan en annan i gruppen ta upp bollen och fortsätta.

  • Säg aldrig emot någon i din egen grupp under en presentation
    Oavsett vad den säger. Stå enade. Säg aldrig "Jag tyckte inte det var så vi menade". Måste ni poängtera/ändra något så fyll ut, säg inte emot. Om inte ni håller med varandra, hur ska ni då övertyga en publik?

  • Teori, ett tal ska:

    1. Ge lyssnarna något
    2. Röra publikens känslor (röra till handling)
    3. Behaga.
  • Lita inte på tekniska hjälpmedel

    1. Låser ner talaren till ett för strikt manus
    2. Får det att kännas stelt
    3. Tekniska hjälpmedel i sig är okej om de används rätt, "business". Allt har sin plats.
    4. Datorer går sönder
    5. Utrustning strular
    6. Om du helt plösligt får 20 minuter mindre på en 50 minuters presentation kommer du vara tvungen att snabbspola slides, vilket är oseriöst och förvirrar lyssnaren.
    7. OH är även kännd som tjänstemannarespiratorn

  • Titta aldrig på en PP
    Du vet vad som står där, läs inte av den. Placera istället datorn så att den står till framför/till höger om dig, så du kan snegla på den samtidigt som du läser av publiken.

  • Räkna inte med att alla kommer närvara
    En presentation ska kunna hållas med någon frånvarandra.

  • Om någon är frånvarandra, be inte om ursäkt. Ni kan poäntera faktumet, men gå snabbt vidare.

  • Frånvaro är inte en giltig ursäkt för att inte kunna hålla en presentation.

  • Upprepa erat budskap

  • Försök att ha max tre huvudargument
    En lyssnare kommer inte ihåg fler än tre huvudargument

  • Det är okej att tappa bort sig.

    1. Man framstår mänskligare
    2. Ha anteckningar du kan gå och titta på om allt låser sig.
    3. Lär dig tappa bort dig snyggt.
    4. Om du tappar bort dig, gå lugnt över till dina anteckningar som ligger på bordet brevid. Öppna boken lugnt, skumma en sekund. Ta en klunk vatten. Börja om. Då får lyssnaren dessutom en paus.
    5. Be aldrig om ursäkt för att du tappar bort dig.
    6. Be aldrig om ursäkt för att du tappar bort dig.
    7. Du kan vara tyst i flera sekunder utan att det verkar konstigt, det blir bara effektfullt. Det känns som tre år för dig, men det är bara 3 sekunder.

Tid
  • Du har cirka 30 sekunder på dig för att få lyssnarna intresserade.
    Ha en bra inledning

  • Räkna med att det tar tio gånger längre tid än beräknat att förbereda en bra presentation.
    Mycket trial-and-error.

  • Öva med klocka
    Du har oftast en utsatt tid, denna ska du varken gå under eller över.

  • Ha kvalitativ tid.
    Dra inte ut på saker i onödan. Utnyttja tiden.

Anteckningar
Det råder väldigt delade meningar huruvida en talare bör ha anteckningar eller inte. Det beror på typ av presentation. Generellt sätt så är det okej så länge du inte låser ner dig vid dem. Du ska kunna allt du ska säga utan dem. Experimentera dig fram. Gör det som du känner dig tryggast med.

Värt att upprepa: Du ska kunna allt du ska säga utantill. Du får inte läsa direkt från ett papper. Det är vad min gamla lärare skulle kalla en retorisk dödssynd.


  • Även om du kör utan anteckningar, ha dem liggande i ett snyggt anteckningsblock som psykiskt stöd. Just in case.

  • Om du använder anteckningar, försöker använda stödord eller feta ord ur en lång ted. Annars kommer du tappa bort dig i dina egna anteckningar.

  • Lär dig följden, inte orden.
    Det är mindre chans att tappa bort dig om du kan följden på vad du ska säga, din argument. Då behöver du inte minnas de exakta orden. Inget tal bör vara likadant två gånger i rad.

  • Öva på nyanseringar
    Dessa gör presentationen mer levande och även roligare för dig.

  • Lägg in guldkorn.
    Öva in korta formuleringar du vet går hem.
Kroppsspråk

  • Bara en liten del av hur lyssnaren uppfattar dig beror på vad du säger. Det som verkligen uppfattas är hur du säger det, ditt kroppsspråk. Öva.

  • Ditt kroppsspråk speglar din attityd.
    Står du inåt framstår du som blyg. Står du med handflatorna innåt verkar du vara stängd. Handflatorna utåt framstår du som öppen och ärlig.

  • Ögonkontakt

    1. Försök att få kontakt med publiken.
    2. Hitta någon att vila på, men lås dig inte till personen.
    3. Sök aktivt ögonkontakt.
    4. Inte titta för högt eller lågt (lågt är blygt, högt är arrogant)

  • Tänk på dina handrörelser
    Dina lyssnare följer dem. Rör du dig för lite känns du stel, för mycket rörig. Rör du dig för mycket kommer lyssnaren till slut sluta lyssna och bara se på dina händer.

  • Öva på ditt kroppsspråk. Minst lika viktigt som det du säger.

  • Va i linje med ditt kroppsspråk och ditt tal.
    Båda måste matcha varandra.

  • En ledlös/svag person ser väldigt dålig ut.

  • Vänd aldrig ryggen mot någon i publiken.
    Måste du t.ex. peka på tavlan så vänd dig i sidled. Stå brevid den (med kroppen frammåt mot publiken) och peka med armen.

  • Ha armbågarna längst med kroppen
    Armbågarna utåt anses ovänligt.

  • Om möjligt, öva i rätt sal.
    Var man ställer sig bör aldrig vara en slump.
Lycka till! Om du har några frågor, tveka inte att kontakta mig eller kommentera denna artikel.
Earlier this year Ben Collins and Brian Fitzpatrick gave a seminar on Google TechTalks on the subject "How Open Source Projects Survive Poisonous". It's an interesting seminar and one can learn a lot from it since many of their points are valid even for none-open source projects.

» Continue to the Google video
» Search for more Google TechTalks
Recently I've been working on a new version of my webcam software for Snyggast Chatten. Basically it allows our users to broadcast their webcams and view others. Here is a quick GUI preview:



The new system is re-written from the ground up. The GUI is better, users can report rule violations, we can maintain bans easier. Everything is simply better. More information will follow..