New Job, old me
Posted: Wednesday, April 29, 2009 by Ric inI am proud of that fact that I did it:
I made the difficult decision of choosing to go away from a laid back, but not-so-challenging position to something more demanding, but hopefully more rewarding also.
Where I was, I was not doing so much development work, but really trying to prepare myself to try to become a Project Manager.
the process of turning me into a PM was starting to drag as the company’s objectives got out of focus from the recession and all..
I was half of the development team, so it was a straight forward job, without much pressure to be honest.
I have moved away from that, and decided to join a more challenging but more development related position where people around me may understand how I feel when I want to keep improving myself and expand my knowledge and experience beyond the norm.
I am now working closer to what I would call a real coding environment: with real development needs, source code checks, peer reviews and the occasional wtf metric as per xkcd’s famous cartoon
I’m serious, today I felt like this could be an enjoyable challenge.
Take this assignment, for instance, the simplest thing in the world right?
Add some icons on to a TreeView:
Seems like a piece of cake, well it was, but it took me some time to get my act together..
1. First, the PostBack on index changed was not returning the ViewState properly
2. It was part of the request that we have different icons per item, I needed to come up with a solution, without having to learn all the new code in a day
(it calls some methods on Item change and the moment I would start trying to copy code to the control, all hell would break loose)
3 The icon setup should be done in a way where it doesn’t have the attributes hardcoded.
4. I am a C# /SQL Server coder by choice, this is a VB.NET house with mostly use of Oracle over SQL Server
On top of that, I am not yet fully understanding the current source control mechanism, if there is one, so if this was me some 2 years ago, there I would be worrying about every single code change….(commented code ville), so its been fun.
At first I thought that the reason the PostBack was screwy had to do with Ajax not supporting TreeView as per the documentation
I was extremely happy to be proven wrong on that one when I read and followed the steps in Scott On Writing’s blog! What a mind opener.. it really turned my day into something good in so many ways.
Then it was easy, I just created a custom control, with a TreeView inside it, and an event with a delegate sent to the TreeView sending the event back to where it was originally in the old code.. its was really easy and I didn’t have to learn too much of their current code, because I didn’t change anything really.
So that was that, but then well, the best way I could think of (under tight schedule) to get the configuration setup was to have an XML file, basically it was like this, every department can have several IDs and each department will have an icon.
my approach:
<department_name>
<id>1</id>
<id>2</id>
<img>imageURL</img>
</department_name>
xpath was designed specially to make me able to forget how to use it!
I was able to do a simple foreach on all ids and find them on the xml file, retrieving the image path to the node image setting.. so simple.. but felt great.
I am a happy C# Developer, C# feels natural to me, so having to code in VB.NET will take some time getting used to..
I could have probably just used SharpDevelop or Reflector to switch between one language and the other, but I am very happy with developerfusion’s take on things with their .net code converter. I used it extensively today, and though I must say, I have never seen it work out of the box, there are always some tweaks to do, it sure makes the journey much more pain free.
Oh… I didn’t forget my previous comment, how did I get round the fact that I am currently working disassociated from a centralized versioning control system? As always: Git
I don’t know how much my life has improved since starting to use Git on all my versioning needs, when I was done and ready with the code, I pulled out TortoiseGit to help me do a diff between my end result, and the code as I initially received it to make a nice update log sheet and send to my peers.
So far, so good, happy to be put to the test, but happier still to have a day off tomorrow:
If you are in Japan, please enjoy your Shōwa no hi, I know I will!