onstwedder.com

All that you have is your soul

0 notes &

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 onweren moeten we thuis zijn!”. “Ik voel druppels op mijn kop!” riep ze terug. “Voel je druppels op je hoofd? papa ook”.

 

We fietsten langs een paar pubers die stil stonden op hun fiets en een energydrankje aan het drinken waren. Ze keken naar mij en ze zagen een oude man. Ik dacht terug aan toen ik ‘s avonds na het uitgaan met wat vrienden op onze fietsen stond na te praten - voor mijn gevoel niet eens zo lang geleden.

 

Maar kijk eens waar ik nu was: een eigen huis, een eigen tuin, een moederfiets en ook nog eens een dochter en een zwangere vrouw. 

 

Gelukkig waren we op tijd in onze tuin. Ik zette de fiets in de schuur en rende naar de achterdeur. Vlug ging ik naar binnen. Het begon te stortregenen. Julia had haar schoenen en jas nog aan terwijl ze op de deurmat naar buiten stond te kijken.

 

“Ik wil naar buiten.” zei ze, “waar is mijn paraplu?” Ik keek naar buiten. Het regende heel hard, de regen ketste op de terrasstenen bijna een centimeter omhoog.  “Ik wil naar buiten”, herhaalde ze. Ik liep naar de gang en pakte een paraplu. “Hier.” zei ik, terwijl ik de paraplu opende en aangaf. Onder de paraplu liep ze naar buiten. Ze genoot van het geluid dat de druppels maakte.

 

Ik stond binnen: Droog en oud.

 

(Na nog geen minuutje wilde ze alweer naar binnen.)

geschreven in juni 2011.

Filed under verhaal nederlands

2 notes &

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 the BlackJackView class. 

Again this is to keep inline with the MVC-model. The V in MVC, stands for the View, and it should do the stuff that’s needed for displaying the information (or erasing some of it, in this case).

So the startGame: method looked liked this:

-(IBAction) startGame:(id)sender{
    
    for (NSImageView *timageview in [(BlackJackView *)self.view imageviews]) {
		[timageview removeFromSuperview];
	}
	[[(BlackJackView *)self.view imageviews] removeAllObjects];
	
    
    blackJackModel = [[BlackJackModel alloc] initWithController:self]; 
    [blackJackModel setupGame];  
}

And after the moving of the actual functionality of removing it will be turned into this:

-(IBAction) startGame:(id)sender{
	[(BlackJackView *)self.view cleanView];
    blackJackModel = [[BlackJackModel alloc] initWithController:self]; 
    [blackJackModel setupGame];  
}

Read more …

Filed under blackjack programming mac osx Cocoa Tutorial Xcode

0 notes &

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 controller needs only to receive the notifications from the view (a click on a button) and needs to set the view, based on signals from the BlackJackModel.

The BlackJackView is the least changed. All I did here is add a method that can set the HiddenStatus of the three button. I figured these buttons’ hidden status are kind of always set together, so i made one method:

-(void) hideHitBtn:(BOOL)hideHit standBtn:(BOOL)hideStand restartBtn:(BOOL)hideRestart
{
    [self.hitBtn setHidden:hideHit];
    [self.standBtn setHidden:hideStand];
    [self.restartBtn setHidden:hideRestart];
}

Read more …

Filed under blackjack mac objective-c osx coding programming Cocoa Tutorial Xcode

1 note &

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 and of course they have the first right to claim me.

Now the coming week I will be very busy - so the follow up will be either tomorrow or somewhere next week.

Read about the MVC-model here:

“we do MVC” and apple’s Model-View-Controller document

Filed under mvc osx objective-c Cocoa Tutorial Xcode

3 notes &

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 to discuss later on (not limited to these):

Read more …

Filed under programming mac objective-c osx Cocoa Tutorial Xcode