Tuesday, December 21, 2004

Writting better code but..


In code, sometimes you write bizarre but faster code:

let's say:

c = Jaca(Ovo(math.exp(HORRORS/TERRORS+1)+1));

where x = (HORRORS/TERRORS). You avoid using memory for an extra variable. But...

In math, if x is expressed as above, only an idiot would prefer to type HORRORS/TERRORS to
x. HEHEHEHHE I have seen with my own eyes someone saying that writting x is very confuse and that's not obvious that an expression with x instead of (HORRORS/TERRORS) is much clear to read ROTFL!!!!!!!!!!!!!!!!!!

Monday, December 20, 2004


Lately, I haven't been able to code at my job, as I've been writting manuals. But as we're heading to a break due to Holydays I got some time to dig ASP.NET better- they don't mind if it is for a work purpose as we have some electronic control written in ASP. It is interesting to convert it to a better style). I always enjoyed C#, but ASP.NET was a bit weird for me. But now, I got how interesting it is for web programmers. I use:

web matrix

you may design very complex pages easily and still have control over your code. God, I am even tempted to code XML again. Hey Nicolas, if you read this, I am trying to dig your code deeper,
just be patient please.

There's gotta be something wrong with me as I am becoming more and more a Microsoft fan. However, I think that ASP.NET owes a lot more to that Borland Delphi guy than to Bill Gates.
But no, I won't use IE.

Tuesday, December 14, 2004


I am not a graphic artist, nor I am a web designer ( not professional at least) but I had this itchy on my fingers and a voice saying "tableless...".

So it used to be :


Now it is:


With two collumns I think I should have never used tables. Or frames. It is interesting that I can design a css/XHTML page to match a layout made on photoshop but that I suck incredibly when trying to layout. That's why I try simple layouts.

Not because I can't afford DreamWeaver, I rather prefer to code it by hand so tableless might imply a bit more work than tables. But as you have a basic layout it is easier to improve it from a root CSS tableless file than one made of tables.

But I don't mind. Lots of sites, even the biggest ones, still use tables. Gmail uses frames, Orkut uses tables and font tags.

On a complete different issue, I am getting tired of Java as I go enjoying C#. Unfortunately I don't feel like coding anything lately. I still owe Nicolas Colombain a few code lines and also
C# keeps me hauting every day.

I am also trying to buy a bass guitar. A 5 string one. To achieve it, I will have to sell my N2 Washburn Guitar. I am a big enthusiast of bass and also have written many bass lines for
my music, so it is time to finally get a bass... When I try out an harmony I usually prefer my acoustic guitar.

Dra. M. Silvia says that I need to run or do something to release the anger I feel here at my job.

Bass playing helps.

Monday, December 13, 2004


I would say that 2004 was the worst year of my life, except if I didn't think of my son. He's not just my son but he's already my best friend, despite being only 2 years old.

I see no reason whatsoever to think that 2005 will be a better year.

My wish list (which I am not likely getting ) :

- Quantum Leap Seasons 1 and 2 DVDs
- Babylon 5 All seasons DVDs
- Stargate All seasons DVDs
- Python Pratical Programming
- C# How To Program
- An air conditioned

I saw Harry Potter 3 and Underworld this weekend. The first is always amusing and this time, I thought it was a little weaker than parts 1 and 2 but still quite interesting. Underworld might sound as a typical gore or horror movie, however it goes beyond the description. Werewolves and vampires are at war for centuries, but it is a multilayer film. Also, the makeup effects, used rather than digital art makes it a decent product of entertainment. I like a story if it makes me feel I am inside it, and UNDERWORLD got it.

Every year I make a real good effort to send people merry Xmas and happy new year. Man, I even put Xmas themes on my web site. This year, nothing I promise.

Wednesday, December 08, 2004

Why should I work with a cold?

I won't thank God for the wheater here at Sertaozinho. After all, it's the idiots that live here (that screwed up the vegetation so much, planting sugar cane with all the bad that comes from it), that I blame for destroying a large portion of my state.

There is a house close to where I work and there used to be a large tree, which spread a wide shadow where I used to park my car. The owner of the house is an old angry man, and he didn't like that other people than him parked their cars "in his own shadow". hehe So he cut off the tree. Yeah, here in Sertaozinho, they don't mind cutting off trees. As a whole, they are dumber than average and add to it that most people here has never learned manners.

So, I am not proud of this town. I hate it. 40 C under the sun and the rain does not come.

Gotta love it, huh?

Tuesday, December 07, 2004

Don't give up

Don't Give Up Lyrics

by Peter Gabriel

in this proud land we grew up strong
we were wanted all along
I was taught to fight, taught to win
I never thought I could fail

no fight left or so it seems
I am a man whose dreams have all deserted
I've changed my face, I've changed my name
but no one wants you when you lose

don't give up
'cos you have friends
don't give up
you're not beaten yet
don't give up
I know you can make it good

though I saw it all around
never thought I could be affected
thought that we'd be the last to go
it is so strange the way things turn

drove the night toward my home
the place that I was born, on the lakeside
as daylight broke, I saw the earth
the trees had burned down to the ground

don't give up
you still have us
don't give up
we don't need much of anything
don't give up
'cause somewhere there's a place
where we belong

rest your head
you worry too much
it's going to be alright
when times get rough
you can fall back on us
don't give up
please don't give up

'got to walk out of here
I can't take anymore
going to stand on that bridge
keep my eyes down below
whatever may come
and whatever may go
that river's flowing
that river's flowing

moved on to another town
tried hard to settle down
for every job, so many men
so many men no-one needs

don't give up
'cause you have friends
don't give up
you're not the only one
don't give up
no reason to be ashamed
don't give up
you still have us
don't give up now
we're proud of who you are
don't give up
you know it's never been easy
don't give up
'cause I believe there's the a place
there's a place where we belong

Though I am really down these days...

Friday, December 03, 2004

Serial COM in C


I've been studying C programming using the API to communicate with the
serial port using WINDOWS and the Microsoft C/C++ compiler. I am actually
implementing examples from Professor Constantino Seixas Filho, PHD from UFMG
and trying to put modularize everything.

Professor Constantino has a real interesting page with his lectures that can
be found at:


Warning: I tried to compile it under BCC55 and DevC++/MingC and it won't work.
It happens because the code uses MS Typedefs, and the other compilers won't find
these references to the API structures and constants.

Although I can help you to learn it, I am not saying that I am the author of
this code. I rather just modified it a bit.

I just plan to create a framework to communicate a PC with a microcrontroller,
maybe a PIC or HC12.

If you would like to read the code, please visit my web site. It is clear that this API isn't much harder to grasp than the Java one. However, it apparently runs ok only on VC6.