January 2012
4 posts
1 tag
Risotto spinach Animated with Loopcam for iPhone.
2 tags
Zomeronweer.
Ik hoef niet in de spiegel te kijken om te zien dat ik oud ben. Opeens op de moederfiets op straat, kwart over vijf, overviel het mij. Achterop zat mijn dochter: ze is nu ruim twee en een half. Ik fietste wat sneller dan normaal, want het begon een beetje te regenen en het zag eruit alsof het zometeen keihard zou gaan onweren. “Papa fietst snel!”, riep ik naar de peuter achterop, “voordat het gaat...
1 tag
Girl with tattoo breaks open peanuts Animated with Loopcam for iPhone.
1 tag
Demonstrating it is hard to roll Animated with Loopcam for iPhone.
April 2011
2 posts
9 tags
Cocoa coding:blackjack tutorial - part 13
Added the source code of the blackjack tutorial for download. click (t)here for the: sourcecode
7 tags
Cocoa Coding:BlackJack tutorial - Part 12
Looking back I have made a working blackjack. But there are still a few open ends. So let’s start with the cleaning of the view. This removes all the drawn cards (of both hands) from the window’s NSView. Currently it was done in the BlackJackController’s startGame: method and while I do feel it should be initiated from there, the code actually doing the work should be moved to...
March 2011
22 posts
9 tags
Cocoa Coding:BlackJack tutorial - PART 11
And here it is. The (near) final part of the blackjack tutorial. In which i change nearly all the files, except the xibs, the AppDelegates and the deck class. The rest is changed - so this is one heck of an episode in the tutorial.
The main thing I’ve done now, is implement a real MVC-model. That means that the BlackJackModel class needs to do everything that has to do with blackjack. The...
6 tags
Cocoa Coding:BlackJack tutorial - PART 10.5
The tutorial took more time than expected, so i kinda finished it off quite quickly. I did mention a couple of things being left open. Stuff that was just plain wrong - like the ace always returning a pipvalue of 11, and stuff that was sneakily wrong. Like the model being in the controller.
So I’ve decided to clean it up. But when I tried to start to fix it. My family wanted some attention...
2 tags
7 tags
Cocoa Coding:BlackJack tutorial - PART 10
So the last part of magic, before I need to do some major tweaking, is done in the stand: method in the BlackJackController.
I’ve already promised that I would add some AI there and for this short part of the tutorial, all I’ll do is make the dealer either draw a card or stand.
After I’ll add that - it’s sort of finished.
However there will be some points open and ready...
7 tags
Cocoa coding:Blackjack tutorial - part 9
Well. That looks really smart. But how come after clicking I still see a start button and not the hit and stand button. Obviously, it is because I haven’t said anything in the code about it yet.
And that’s what I will do now.
First I’ll declare the hitCard: and stand: methods in the BlackJackController.h - They look the same as the existing startGame: method.
The...
7 tags
Cocoa coding: Blackjack tutorial - part 8
In this part I’ll finally show those images of the cards in the application.
Of course since everything is already in it’s place - in the last part I’ve dealt the cards into the appropriate hands- all I need to do now, is add a way to show the images that belong to the cards in the hands.
The blackJackController knows the blackJackView and knows the blackJackModel that the...
6 tags
Cocoa coding: Blackjack tutorial - part 7
Looking at what I have now: a couple of classes for the Hand, Deck and Card. Then there is the BlackJackView and the BlackJackController and of course the tutorial21AppDelegate.
So let’s pretend I know what the Model-View-Controller (MVC) model is, and since i see a View and a Controller, the only thing missing is the Model. So let’s create a BlackJackModel file. If nothing else, it...
7 tags
Cocoa coding: Blackjack tutorial - part 6
In this part I will set up the MainMenu.xib, containing the “window” of the application. That’s the one I’ve ignored up to now, by going straight to the Log Console.
Basically in the MainMenu.xib I only changed the window title to “Blackjack”.
That’s it so far.
Now I am going to add a BlackJackView Class. In the Classes directory add new file, choose...
8 tags
Cocoa coding: Blackjack tutorial - part 5
So there’s a couple of things I want do to the card class: 1) add a property that will set the card open or close. 2) calculating the pipvalue differently if the property is close. 3) Add an NSImage to the card, that will either return the image of the card or a closed card, again depending on the property.
Also we’re gonna need some cards images. Of course you can draw them yourself...
9 tags
Cocoa coding: Blackjack tutorial - part 4
So i’ve moved up to Xcode 4 and imported the subversion blackjack into Xcode 4. It worked quite well, though it did have an issue with the following line in my code, specifically in the initWithCardId: suit: in the card.m
if (self = [super init])
There are two solutions proposed by the warning either 1)make it a == if you actually want it to be a compare. or 2. place parentheses around...
3 tags
6 tags
Cocoa coding: Blackjack tutorial - part 3.5
Right in the (somewhat) middle of writing the tutorial, apple releases Xcode 4. Making me think that I might actually update Xcode so the tutorial will be in 4. Or maybe not.
Of course i will be using a nib further on. And that will be different for sure, cuz the interface builder will be in it.
Also the configuring Subversion tutorial became outdated in less than a week!
You have to love...
9 tags
Cocoa coding: Blackjack tutorial - part 3
So here’s the 3rd part of the tutorial - and boy does it takes more time than planned.
Basically what I have from the first three parts (including part 0, that is) of the tutorial is now a Deck with playing cards, that can be initialized and print itself to the NSLog to prove it is somewhat working.
Hence we’ll now add the implementation of the shuffle and the drawCard methods.
The...
8 tags
Cocoa coding: Blackjack tutorial - part 2
So let’s start with 1 and 2 from the list: a deck of playing cards.
I will add two classes to the empty project: a Card class and a Deck class. At first, these class will be quite basic. We’ll test them via NSLog and there’s no graphical interface concerning them (yet). Also, I am not going to worry about Model-View-Controller (MVC) yet.
So let’s start with the...
6 tags
Cocoa coding: Blackjack tutorial - part 1.
*This is part of a objective-C, cocoa tutorial, that will result in a working blackjack for a os x*.
Previous chapter: blackjack tutorial part 0. Next chapter: to be added (later).
The first thing is to map out what we’ll want. Which in this blackjack tutorial is quite easy. We want to end up with a working blackjack.
So what do we need:
1) Playing cards which can return:
what card it...
7 tags
(Installing and) Configuring Subversion for Xcode
So if you start some “serious” programming with Xcode you might consider using Subversion (SVN) - a open source version control system. I’d recommend using it as soon as possible, because it can be helpful.
Here’s how i intent to set it up. I am fairly sure you can use Subversion for a team - just like at my work, where we still use CVS for our code. But at home, where i...
8 tags
Cocoa coding: Blackjack tutorial - part 0.
So basically I was playing around with objective-C and reading “Cocoa Programming: a quick-start guide for developers” and I stumbled upon a great link that explained how to create a deck of cards, shuffle it and draw a card from it in Objective-C. The trouble with the link is, there’s only 1 part. So i’ve decided to redo and remake the tutorial right here.
The end goal of...
2 tags
Vrijdag patatdag
Het is vrijdag afgelopen week. Daar sta ik bij de patatboer in de stad. Het is niet dat ik elke vrijdag patat eet. Wel vaak. Dat zijn de voordelen van een ongeorganiseerd bestaan. Op de dag zelf bepaal ik wat ik ga eten. Vaak bepaal ik op vrijdag dat ik patat ga eten.
Het is druk bij Bram (de snackbar). Achter de toonbank staan ze met tegenzin te werken. Logisch als het zo druk is. Veel te veel...
2 tags
Vast in de lift
Gisterochtend zat ik en nog vier andere mensen vast in de lift. Ik was onderweg naar de zevende. Maar de lift bleef net iets onder de derde verdieping stilstaan. Voordat ie stopte bewoog de lift nog een beetje schokkerig (een stukje omhoog en weer een stukje omlaag). Misschien was dat het moment geweest om te panieken. Maar niemand raakte in paniek. Secondes tikte voorbij.
Van de vijf waren er...
1 tag
Bewaarde gedachtes uit een vakantie in 2002
Isla Margarita 2002.
In een cafe hangen de muren vol met foto’s van mensen die het er gezellig hebben. Een leeg cafe met een muur vol foto’s.
Kakkerlakken. Ik word wakker en precies boven mij op het plafond zit een kakkerlak. Eerst durf ik niet te bewegen. Zoals bekend walg ik van insecten. Kakkerlakken schijnen banger te zijn voor mij dan ik voor hen. Ik kan het mij werkelijk niet...
2 tags
Toekomstchaos
Het is de eerste week van december. Buiten is het donker en de gevoelstemperatuur is alleen daarom al tien graden lager. Ondanks dat het nog maar net zeven uur is, is het niet leeg op straat. Eigenlijk is het altijd druk in de stad. Het heeft misschien een uurtje geleden nog geregend. Op de radio wordt gewaarschuwd voor een opvriezend wegdek.
Ik ben op weg naar de tramhalte en de bushalte, want...
2 tags
Happy with you
I am not happy
I am not happy
I am not happy
without you
February 2011
26 posts
2 tags
Twee bomen
In de ochtend
na een feest
Opeens denk ik aan Huub - een dichter
die mij ooit vertelde hoe hij na een feest
O N G E L O V E L I J K
verlangde naar een beetje rust
Ja, meneer Oosterhuis, ik heb dat gevoel ook wel eens
Meestal al voordat het feest begonnen is
geschreven in ±1997
2 tags
Vast in de lift
Gisterochtend zat ik en nog vier andere mensen vast in de lift. Ik was onderweg naar de zevende. Maar de lift bleef net iets onder de derde verdieping stilstaan. Voordat ie stopte bewoog de lift nog een beetje schokkerig (een stukje omhoog en weer een stukje omlaag). Misschien was dat het moment geweest om te panieken. Maar niemand raakte in paniek. Secondes tikte voorbij.
Van de vijf waren er...
2 tags
Wereldvrede in de Rotterdamse metro
Ik stond in de metro en vlak tegenover mij stond een moeder, een dochter en een iets jonger zoontje. Het waren overigens duidelijk broer en zus, ze leken qua uiterlijk op elkaar. Ze hadden ook allebei een opgerold metrokrantje in de hand. Als je een hamer hebt lijkt alles op een spijker, en als je een opgerold metrokrantje beet hebt, wil je ook maar een ding doen: slaan.
Ik herinner me nog goed...
2 tags
Welkom in de studio
1995 was het laatste seizoen van het programma Poetry People. Dit was een VPRO programma over het nieuw aanstormend dichterstalent van Nederland. In 1995 beschouwde ik mezelf nog als aanstormend talent en zonder verwachtingen stuurde ik een gedicht in.
Ik was verbaasd toen ik twee weken later gebeld werd met een uitnodiging om voor een live-interview in het programma te komen. Ik voelde me...
2 tags
Pijn-lijk
Ik drink koffie in de zon.
Een vogel vliegt tegen het raam.
Dat is natuur.
Hier geldt de sterkste overleeft:
het raam is heel.
geschreven in 1994
2 tags
Verloren liefde
Toen ik in de laatste klas zat van de basisschool, was ik in het geheim verliefd op een meisje dat op onze school -in de één na laatste klas- kwam. Het was geheim, niet zozeer omdat ik het haar nooit verteld had, maar meer omdat ik pas jaren later realiseerde dat ik verliefd was. Haar naam was Brenda. Ze was een bijzonder knap meisje. Brenda was een beetje kleiner dan ik en ik herinner me dat ze...
2 tags
haiku
heard some eerie sound
i did not know what it was
so i got afraid
geschreven in ±1998
2 tags
Gym op de middelbare school
Iedere woensdag wanneer we moesten gymen, klonk het weer: “Okay, maak teams”. Op de een of andere manier waren sporten die je in je eentje moest doen (denk aan tafeltennis en badminton) ondergeschikt aan teamsport. Iedere week moesten er teams gemaakt worden.
Bij het kiezen van een team was het belangrijk om te weten wie in welke groep thuishoorde. Er waren in onze middelbare school...
2 tags
Gehoord op de markt
vrouw: "Ik kan het niet geloven dat zij het zich niet herinnerde."
man: "Ach, jij vergeet zelf toch ook veel dingen."
vrouw: "Maar ik vergeet de leuke dingen niet!"
man: "Misschien vond ze het wel niet leuk dan."
Ik bedoel daar kan ik niet tegen op verzinnen, toch?
2 tags
De tijd gaat te snel
Och ja, liefste wonend in Trier
wanneer ik terugdenk aan al ons plezier:
De dromen, de liefde en vooral aan het vuur
dan duren de dagen maar 23 uur.
geschreven rond 1995
2 tags
Kwijt
Ze had de mooiste ogen
en ik heb er spijt van dat ik er niet
nog langer in heb gekeken.
Ik wil de dingen precies herinneren
die ik in haar ogen zag
maar het lukt me niet
De herinneringen zijn onscherp
de schitteringen en de sterren
Ik weet dat het er was.
Ik wou dat ik ze nu kon zien.
Geschreven in ±2002
2 tags
Marathon in Rotterdam
Het zal geen verrassing zijn dat ik het in principe niet zo op heb met de aanstellerigheid van topsporters. Altijd maar die drang om zichzelf te willen bewijzen. Desondanks is dit de tweede of derde keer dat ik de marathon in Rotterdam bekijk vanaf de straat. De lopers rennen bij mijn huis voorbij om 12:00 uur, 12:30 komen ze weer de andere kant op en 13:30 lopen ze voor de derde keer langs. De...
2 tags
Het potlood (Ontevreden)
Een geel potlood
met een roze gum
vroeg mij plotseling deze vraag
“Kunt u mij vertellen wat ik ben?
Ik hoop een mooie ganzeveer of
op z’n minst een stalen pen.”
Hij pauzeerde even en herhaalde
toen de vraag:
“Kunt u me vertellen wat ik ben?”
Ik twijfelde aan mijn antwoord
en luisterde met verbazing naar mijn eigen stem:
“welnu, meneer u bent…...
2 tags
Het naspel
Ze zei: “Vriendelijk bedankt.”
en ze schudde mijn hand.
geschreven in ±1995
2 tags
Swiebertje
Op twee journaals op verschillende zenders wordt aandacht besteed aan Swiebertje; de complete cast is namelijk weer voor één keer bij elkaar. Ik ben, zoals jullie waarschijnlijk inmiddels wel weten, geboren in 1974. Nazoeken op het internet wijst uit dat de serie Swiebertje van 1955 tot 1975 liep. Ik heb swiebertje, ondanks herhalingen later, eigenlijk nooit gezien.
Beiden journaals melden me,...
2 tags
De liefde
Luister
hoor de jagers,
de prooi,
het hijgend hert.
de warmte van
haar lichaam
de stilte in
haar ogen.
“De natuur is
een monster.
De mens is een
dwerg.”
Angst en zweet
Spanning adraline
dan de onvermijdelijke schoten
en het zoeken naar een teken
dat de schoten hun doel hebben bereikt
Maar zij loopt
ongeraakt door.
laat de jager
alleen achter,
inmiddels richtend
op een nieuwe...
3 tags
De fabel
Er waren eens vier eendagsvliegen. Maar één ervan had zijn dag niet.
Er waren eens drie eendagsvliegen. Ze waren door hun moeder vernoemd naar stripfiguren; Ze heetten Kwik, Kwek en Pluto. Kwik en Kwek waren vanaf hun geboorte al heel close, terwijl Pluto een beetje het buitenbeentje was.
Op een dag werden ze door moeder bij elkaar geroepen. Moeder ging ze voorlichting geven over het feit dat...
2 tags
De eerste zin
Vroeger toen ik nog in de euforie van het schaatsen geloofde, trachtte ik met mijn vingers, koud als ijspegels, de schaatsen aan mijn voeten vast te binden, zodat ik mij snel op het gladde ijs kon begeven. (Ik moet dan altijd denken aan mevrouw De Lieve [ Nederlands Lerares op VWO] die zei: “De gemiddelde Nederlander kan maar acht woorden per zin lezen.”)
geschreven in ±1996.
2 tags
De architect
Genieten van natuur
is bij mij van korte duur
want na nog geen half uur
verlang ik weer naar cultuur
geschreven in 1995.
2 tags
(De Reden Waarom Ik Bang Ben Voor) De Staf Van...
Er schiet me opeens iets te binnen over de lagere school. Komt vast door de intocht van sinterklaas die eraan zit te komen. Ik zat in de laatste klas van de hogere school. In onze tijd heette dat nog gewoon klas 6.
Mijn beste vriendje Matthijs was eveneens het zoontje van de schoolmeester. Dus toen de meester rond 5 december de staf van sinterklaas moest gaan ophalen bij een andere school in...
2 tags
Communicatie Stoornis
Tussen jou en mij
kan men honderdduizend muren bouwen.
Voor ons maakt dat geen verschil,
We praten toch al niet met elkaar.
geschreven in 1995
2 tags
Een avond in het veld
We liggen in het midden van een grasveld. Ze ligt vrij dicht bij me in de buurt, als ik zou willen, zou ik haar kunnen aanraken. Het enige wat ik hoef te doen is mijn arm een heel klein beetje strekken. Maar in plaats van dat ik haar probeer aan te raken, kijk ik omhoog. Het is donker en ik kan zowaar een aantal sterren zien. Niet de sterren die je altijd wel kan zien, maar een paar die echt heel...