As much as it is useful, the static keyword has many different meanings within and across different programming languages. If not for anyone else, I want to demystify it once and for all, so that I never have to google it again!
Friday, August 27, 2010
Thursday, August 19, 2010
Upcoming posts
Just making a note of what I am going to blog about next. There will be one post about static methods and static variables, clarifying them once and for all. I will look into how they behave differently in Java and in C (you cannot have static variables inside methods (static or otherwise) in Java. They can only be class variables, if I understand correctly. Again, this needs to be looked into.
The second Java related post is going to be a real short one about casting a variable from one data type to its super class data type. This is pretty straightforward if you think about it for a couple of minutes, but I recently tackled this problem at work and its fresh in my mind.
As far as Manchester United is concerned, one thing has been playing on my mind a lot recently. Our transfer strategy. Scott the Red (therepublikofmancunia.com) had a great post about the whole Ozil saga recently. Will type a few words about it myself soon.
The second Java related post is going to be a real short one about casting a variable from one data type to its super class data type. This is pretty straightforward if you think about it for a couple of minutes, but I recently tackled this problem at work and its fresh in my mind.
As far as Manchester United is concerned, one thing has been playing on my mind a lot recently. Our transfer strategy. Scott the Red (therepublikofmancunia.com) had a great post about the whole Ozil saga recently. Will type a few words about it myself soon.
Monday, August 16, 2010
Manchester United vs Newcastle United
My team started the 2010/2011 Barclays Premier League season today against Newcastle United. The starting lineup was as a fan would want it to be...4-4-2 formation, with Rooney and Berbatov up top. Rooney is still finding his killer touch and has gone an astonishing 13 games without scoring for club and country. He did manage to hold up the ball as well as ever, passing it out wide to Valencia and then bursting into the box to receive the cross. His unselfishness (or as Martin Tyler commented, his low self confidence in going for the goal himself) led to him trying to play in Berbatov etc. instead of shooting himself. I don't buy the "low self confidence" thing one bit. Rooney, if anything, is sure of himself. He will take chances, he just needs to get a couple of goals under his belt. In the meantime, I am glad Berbatov and Hernandez look prepared to bear some of his goal-scoring responsibilities.
A rather embarrassing mistake!
Today, I was reminded of a very basic step in programming. Always check-in your code! Well, to be fair to myself, I had to remove 1 file from the checked-in files before merging the transaction, since it was still being worked upon. But, I refreshed my view, and bam, it was overwritten, and it wasn't even checked in anymore!
So I had to write the whole function again. Thankfully, it was not very complicated, neither was it many lines of code so it wasn't a big deal. However, it could have caused a major problem had I been on a deadline and the file was vital. Moral of the story, if you need to unbranch something from your transaction for whatever reason, make sure your changes are backed up BEFORE you refresh the view!
Subscribe to:
Comments (Atom)