New theme in the workings

After seeing the sad state of WordPress themes, I decided to write one myself. So far, I wrote a static page that looks like the main page and it looks pretty sweet.

Next, I’m installing WordPress on my machine and start writing PHP code again (using WordPress functions, of course). Then, I’m going to be a happy WordPress user.

There are news, bad news….

… and half-told-news-that-look-really-bad-but-aren’t.

Before I came to Australia, my mother put my name as the second owner of her account, so I could get a second copy of her credit card, to be used in the case of an emergency.

A few days ago, my father sent me an email asking what I did with the card, as there was a debit of U$ 2.000,00. I sent an email back saying that I never used the card and, thus, that debit wasn’t mine. For some reason, the first thought that came in my mind was “mum bought something and forgot about it” (maybe a new couch to their apartment of something like that, as their apartment isn’t fully furnished yet). I got somewhat uneasy with the situation anyway.

Then, last night, dad sent another email, saying that they found out the card was used in Japan. That, for some reason, freaked my out: Japan is not so far from Australia and there a lot of Japanese people around. I couldn’t sleep anymore. I did, in my mind, a full review of everything I did here, where my wallet was all the time and formulated a lot of theories (someone looked into my pack when I was sleeping in the airplane; someone looked it when there was a party on Julio’s house [and that is completely awful, I admit]; there was a Friday night when I forgot my wallet in the office and pick it Saturday). I quickly replied that they should cancel the card and, for sake, cancel my card (of my bank account back in Brazil). Then dad sent me an email saying:

“Why are you so worried? The card they used is here, in Brazil.”

That came as a relief (but I asked to block my credit card anyway, as I won’t use it anymore). Then came that feeling of “I want to punch dad in the face”. Why the hell he didn’t told me that for a start? All this time, I thought it was MY credit card that they used, when it wasn’t.

Then, in the morning, another realization: if the card is still in Brazil, WHY DID HE ASKED WHAT I DID WITH THE CARD? It has a complete different number!

Now I really want to punch dad in the face.

“When will this crazy dude stop changing his theme?”

For those who still come to this site regularly and are asking yourself “when will this guy stop changing his theme?”, the answer is, probably “When I write my own”.

The thing is: WordPress themes suck. Big time. I can’t find a theme that 1) uses all available space (themes with fixed sizes are stupid), 2) are widget ready and 3) look good.

Any suggestions are welcome (and, if you want, I can list the problems with the themes I tried).

Juggling multple connections with select

One of the things that I never really understood is how to handle multiple connections with select. select allows you to wait for some data coming through a communication channel (pipe, socket, file) and, when there is data available, it will wake up your program and then you can read the data.

The problem is that, when using sockets, I couldn’t really see a difference from using accept which will also hold your program waiting for some connection appear.

The solution came and I decided to post it.