Aleksandar • Vacić

iOS bits and pieces

Season closure

Shit, shit, shit, shit, fuck, fuck, fuck, fuck!

As typical race as any this season. Fernando getting most of it all, Kimi good but with not the perfect car, Montoya very unfortunate, McLaren fast but not very stable and certainly “charmed” with bad luck, Fisico promising but in the end nothing worth mentioning, Ferrari horrible as in the days before Schumacher.

Interesting season nonetheless, much more exciting then previous ones.

Season 2006

What to expect?

Before this season, McLaren was huge favourite (after winter testing) to win all and now has nothing. Hence I expect nothing and everything. I’m looking forward to new proposed way of qualification, which looks to be more interesting than the actual race. I’m gonna jump on any chance to visit any F1 track again. I’m hoping that Mercedes will develop V8 engine that will not have 40% failure rate.

Wild guesses: Ferrari will not be back in the title race next season. Last season of Michael Schumacher. Renault will fall back behind. Williams should be back in the title race, maybe being the best - only if they finally make a good chassis. Red Bull will stay in the middle, Honda will be on par with Renault and McLaren.

Best race of the season

Hell with that - probably the best race of the millennium so far. It shows again that of all the stupidities that Mosley and FIA tries to make races more exciting, the best thing they should do is to bring the rain in the middle of qualification. :)

Phenomenal racing from Kimi, Fernando, M.S. all through the race. Schumacher did really great, defending his position for several laps in front of obviously quicker Renault and McLaren. Fernando, finally not driving painfully boring (except for Imola), shows off all of his talent. The most aggressive racer on the track. And Kimi…amazing as usual with fantastic move at the end - I don’t think that there was more than 2cm between his right front and Fisico’s rear left. I think I woke up half the building screaming from joy there. ;)

Brilliant, really brilliant race, a pleasure to wake at 6:30am for such a race. Renault is 2 points ahead now but if both McLarens stay on track in China, McLaren should win the Championship. But…it will be a very close thing.

RS.GetRows() considered harmful

Most of my professional work is done in ASP. And with ASP I built or helped build lots of different sites, including enterprise-level ones, where web server is constantly hit - like always has 300+ requests waiting with max possible number of requests executing. Over time, I followed what was being considered best practice and implemented these things.

One of those practices, probably the most outspoken is: use [GetRows()]( method of ADODB.Recordset and then work with created 2D array. It is quicker, faster, consumes less memory - more efficient in any way. I could not find a single trace of warning, no side-effects mentioned, nothing.

Thus in the latest project I do, I went all-GetRows. I eliminated all traces of RS.EOF and RS.MoveNext, and built huge amount of code using this technique. Initial testing showed greatly increased performances (3x and more) and it went live.

Soon after, the hellish weeks started.

What no one told you is that using GetRows heavily (and I mean heavily) fragments heap memory. So much, that after some time Oracle OLEDb provider or ADO (have no idea which) starts throwing cannot allocate memory messages with several garbage characters after it. When it will happen depends on how much users are attacking the web site. The more users - the very situation where you need high code speed - the quicker it spends the memory. I guess that after a while it gets into situation where there is no large enough memory block to read recordset into it and/or create an array out of it.

CPU is always close to 100% due to heavy load. Maybe there is no free CPU time at all for memory management…

I’m totally stumped with this and have no idea what to do with it. I spent weeks rearranging the code to minimize the array allocation and only managed to postpone the problem point.

Have anyone built ASP site that gets constantly hit and uses GetRows() or generally uses lots of large arrays? Have anyone encountered this at all?

Moving to .NET is not an option in anything that resembles near future. I’m stuck with this and must solve it somehow; the only option I see now is to return to Recordset processing.

Trip to Tunisia

This week my company, Finsoft Ltd, celebrated its 10th anniversary. For that, all employees (accompanied with either wife, husbands, boyfriends, girlfriend…) traveled to Tunisia for three days.

These days, Belgrade is murky, clouded, depressive city, thus the move to sunny beaches was a great gateaway opportunity. I personally had hellish work weeks before it (and similar would follow) so this short break was really welcome. We stayed in Melia El Mouradi hotel in Yasmine, Hammamet - a tourist resort with huge hotels. Everything is shiny and luxurious and pretty expensive. Since we arrived late at night, there was nothing to see from the bus. Thus I got glimpse of what real Tunisia is like on the way back to the airport. It reminded me a lot to south Serbia which is not very complimenting.

The lovely Mediterranean Sea and wonderful sand beaches are definitely the biggest selling point for Yasmine. This is by far the best beach I have ever been to - although I haven’t been to too many since I prefer mountains over seas. We played beach volleyball, flew the parachute and rode the banana (both driven by motor boats) and generally had a very good time.

Last night we all went to cabaret restaurant Chahrazed (I think that’s the correct spelling). Simple two-part dinner was followed by what most of us thought would be one belly dancer putting (something like) 10-minute show and that’s it. It turns out that its a whole show that would eventually last almost an hour. Frankly, I have no idea how long it lasted. I was so mesmerized by the beautiful girls that I forgot about the dinner, time and everything else. Richly designed and very colourful costumes, greatly rehearsed dancing and beautiful girls (did I already said that?) - completely captivating. When they got up on the tables in the end…let me just tell you that it’s not for the weak hearts.

Sadly, this was not the only thing that followed this dinner. Practically all of us got rather severe stomach problems. I had troubles mere 2-3 hours after the dinner was over, my sister last night (whole two days later). Some got it pretty bad (like fever-high temps), some so and so. But in general, we were all screwed. I’m most sorry that my all-night toilet party robed me completely of the swim & play experience the next day (we headed back in the evening of the next day). I’m still feeling consequences, but it does not hinder (too much) my weekend routine.

Hence - be warned - African food/water is most likely not compatible with us Europeans.

There are other things that I did not like in Tunisia and some that really pissed me off, but I have no wish to write about them now…You see, when I close my eyes I still see this lovely-skinned belly half a meter from my head. And if food poison is the price to pay for this show, I would gladly pay it again.