Stuff i'm working on. Or have worked on. Or stuff that just wanders in my head.
Showing posts with label quality. Show all posts
Showing posts with label quality. Show all posts
Monday, November 17, 2014
Today I learned: Code Quality depends on Reviews.
My Code will be better if I know, it will be reviewed. Here I said it.
If you compared my code I wrote today, for basically myself only, to the code I wrote some months ago for someone else, you will find great differences.
I don't think that I'm either much smarter or dumber than this summer, but if you saw my code, it would be a huge quality difference.
In one code nearly comments every line, what it does and why it does this and how the result of each statement will be used in future, what's the meaning of each variable and so forth, the other code was just hacked to get it to work. It has wonderful statements like
var parentElement = jQuery(this).parent().parent().parent().parent();
Code like this makes me cringe. It shows me, that I write horrible code, at times.
On the other hand, the code I wrote for someone else some months ago, I knew he would be dependent on understanding every detail of my code. And I knew, that he is no profound coder himself. So I made the code as simple and documenting as possible. No little, dirty hacks that are kinda clever, run 2% faster than normal implementations, but are a mess to debug. Everything was well explained and well documented. That was maybe the best code I have ever written, yet.
So, from now on, knowing that someone might read my code will help me to write better code.
One more reason for me, to write more open source code.
Saturday, November 8, 2014
Today I learned: My kids want to spend time with me.
I feel sick today. Not that much sick, that I would stay at home all day, but although I've got plenty of time today, I did not accomplish much.
But, given that hint by a good old friend, I asked my 5yo son, whether he thinks that I worked too much. He replied: "Yes, you work much. But there is something I considered: I want to help you with your work." I asked, how he thinks he could help me, he answered: "I would help you. I would help you changing the tires on our car."
Yesterday, I changed the tires on my car. The younger one helped me, tightening the screws. It was great.
Today, after that short conversation with my oldest son, he said to me, knowing that I feel sick, that I should lay down a little bit and that he will lay next to me an cuddle a little bit.
Right now, after about one hour of lying next to me, listening to some book I read to him, he stood up and went away to playing with some toys.
Kids, the older the less, do not need your attention full 24/7. They want to spend time with you. They want to feel loved, to be taken serious, to connect with the most important people up to now. And this is great. This means, that I can, even if I work much, even if I do not spend as much time with my kids as I liked to, I kinda can make up for this by having time dedicated only to them.
I did not accomplish much. But today, I accomplished some important things. And this is great.
But, given that hint by a good old friend, I asked my 5yo son, whether he thinks that I worked too much. He replied: "Yes, you work much. But there is something I considered: I want to help you with your work." I asked, how he thinks he could help me, he answered: "I would help you. I would help you changing the tires on our car."
Yesterday, I changed the tires on my car. The younger one helped me, tightening the screws. It was great.
Today, after that short conversation with my oldest son, he said to me, knowing that I feel sick, that I should lay down a little bit and that he will lay next to me an cuddle a little bit.
Right now, after about one hour of lying next to me, listening to some book I read to him, he stood up and went away to playing with some toys.
Kids, the older the less, do not need your attention full 24/7. They want to spend time with you. They want to feel loved, to be taken serious, to connect with the most important people up to now. And this is great. This means, that I can, even if I work much, even if I do not spend as much time with my kids as I liked to, I kinda can make up for this by having time dedicated only to them.
I did not accomplish much. But today, I accomplished some important things. And this is great.
Subscribe to:
Posts (Atom)