I've been tasked with my first real leadership position in my current company. I'm a bit struggling with that, since it is new for me and I'm involved with about four to five different projects at the moment.
What made my job easier , and what actually prepared me for that, was the following:
1. My experience as an Insurance Adjuster
2. My occasionally blossoming social life and non verbal recognition of human emotions( it is surprising what people will tell you with their body language)
3. Technical books like "The mythical man month" and "Rapid Development"
4. My project manager, who is also a great teacher
5. Regular stand ups
6. Task management (help you Manager Tools)
8. Learning to ask the right questions (What problems do you have? When are you going to be done?) Surprisingly effective.
9. Delegation, you can't delegate enough! (again, thank you Manager Tools).
30 April 2009
02 March 2009
The sun and the way UML diagrams fold on my freshly inked skin
It is my firm belief that any modern developer, being junior or senior needs to know at least the basic of UML 2.x class, sequence and activity diagrams in order to be productive in his workplace and to communicate effectively with his coworkers about one of the most hard and abstract matters known to man, by which I mean the matter of software design.
But what I find in the field today is sorry state of affairs where the majority of developer are not aware that UML even exists, a small percentage of can read it and only a handful can write and express them selves in the fine software modeling language of UML. It is my opinion , as a practicioner of the craft, that each high school that teaches programming and each university that prepares young feeble minds for a career in IT or software development must teach its students the basics of reading and writing of UML.
UML is most critical to understand object oriented design. When a developer is able to express his idea about a system in uml , that developer shows a deep understanding of that idea, and therefore is able to teach to other, implement it by producing qualty code and adapt it to changes which are sure to come in the future.
Code which isn't described by UML (or any other notation for the matter)is hard to read, hard to teach and hard to change. Code that is described by UML isn't any of those things.
But by the God of Chips and Neurons, UML isn't hard to learn either. You just need a manual (e.g. UML distilled by Marting Fowler) a pen and sheet of paper on which you can sketch your first diagrams. I've learned my UML near the sea in Pula where I live. I would put the Fowler book in my backpack, take a notes and a black 0.4 pilot pen and I would venture on foot the Pula's "long see" (lungo mare) a walkaway for tourists and kinds high on booze and midnight sex , and I would sit there by the see and draw my diagrams watching the sun go down deep below the summer sea and enjoy my self learning a powerful tool which made a better developer, a better person and more ... I don't know.. just better than I was before.
That should be enough for any of you sorry asses who haven't had the time to learn a tool as basic as UML.
But what I find in the field today is sorry state of affairs where the majority of developer are not aware that UML even exists, a small percentage of can read it and only a handful can write and express them selves in the fine software modeling language of UML. It is my opinion , as a practicioner of the craft, that each high school that teaches programming and each university that prepares young feeble minds for a career in IT or software development must teach its students the basics of reading and writing of UML.
UML is most critical to understand object oriented design. When a developer is able to express his idea about a system in uml , that developer shows a deep understanding of that idea, and therefore is able to teach to other, implement it by producing qualty code and adapt it to changes which are sure to come in the future.
Code which isn't described by UML (or any other notation for the matter)is hard to read, hard to teach and hard to change. Code that is described by UML isn't any of those things.
But by the God of Chips and Neurons, UML isn't hard to learn either. You just need a manual (e.g. UML distilled by Marting Fowler) a pen and sheet of paper on which you can sketch your first diagrams. I've learned my UML near the sea in Pula where I live. I would put the Fowler book in my backpack, take a notes and a black 0.4 pilot pen and I would venture on foot the Pula's "long see" (lungo mare) a walkaway for tourists and kinds high on booze and midnight sex , and I would sit there by the see and draw my diagrams watching the sun go down deep below the summer sea and enjoy my self learning a powerful tool which made a better developer, a better person and more ... I don't know.. just better than I was before.
That should be enough for any of you sorry asses who haven't had the time to learn a tool as basic as UML.
27 January 2009
Automed User Inteface Testing
User interfaces components are hard to unit test with standard unit testing framework. There are several reasons for that. In my opinion the principal is the fact that user interface components rely heavily on the interaction between the user of the system and underlying framework of business(or other objects) supporting the user interface control. And sometimes, is quite hard to remove the component from its natural environment for testing purposes, as is the case with ASP.NET web components.
The solution to this problem is two fold. First all domain and infrastructure objects should be logically and physically removed from the user interface and unit tested separately using convectional testing methods. This is nothing new, there are numerous design philosophies associated with that (for example the MVC design pattern always so popular with web development frameworks). The second is to to test the user interface component attached to its underlying system base, in a separate - clean - environment specially prepared to for testing purposes using automated unit testing tools.
For example and ASP.NET application whose user interface is composed by a separate web component library and relies heavily on client side code to facilitate heavy user interactions with few page reloads in order to maximize user experience (ah, the oh so popular Microsoft buzz word of the moment) and to reduce stress load on the system. There are five distinct parts to this application:
All these parts compose the user interface of this theoretical (and so typical application). First , lets us remove all domain objects. Both client side and server side object can be tested using respective testing environments. Now for the remaining three elements there is no way of testing them separately. And, also there is no practical need. Because the goal of testing user interface components is not to see if each of them works correctly as a separate unit (it is impractical , because the amount of mocking requires a separate framework of its own - often custom made for one project only) , the goal it to test the user interface as one system (logical separated by functionality, just to give some order to the mess) in order to provide to the team and to the customer that the system which is built provides requested functionality.
This is accomplished by using automated unit testing frameworks. One that I especially like is Watin, an open source project under active development which allows any developer to programmatically test the user interface of any web application inside Firefox and Internet Explorer (which we are the two browser mostly tested by web developers).
Watin is a good framework. Of course there is place for improvement, by what is accomplished now is very useful in enterprise strength projects. For anyone who has developed with javascript using this framework will be easy and will come naturally.
I would recommend it for everyone doing serious web development in any environment and with any tools.
The solution to this problem is two fold. First all domain and infrastructure objects should be logically and physically removed from the user interface and unit tested separately using convectional testing methods. This is nothing new, there are numerous design philosophies associated with that (for example the MVC design pattern always so popular with web development frameworks). The second is to to test the user interface component attached to its underlying system base, in a separate - clean - environment specially prepared to for testing purposes using automated unit testing tools.
For example and ASP.NET application whose user interface is composed by a separate web component library and relies heavily on client side code to facilitate heavy user interactions with few page reloads in order to maximize user experience (ah, the oh so popular Microsoft buzz word of the moment) and to reduce stress load on the system. There are five distinct parts to this application:
- ASP.NET user interface
- ASP.NET web control
- ASP.NET web control domain objects (entities, repositories, services and specifications)
- Javascript user control attached objects
- Javascript domain object
All these parts compose the user interface of this theoretical (and so typical application). First , lets us remove all domain objects. Both client side and server side object can be tested using respective testing environments. Now for the remaining three elements there is no way of testing them separately. And, also there is no practical need. Because the goal of testing user interface components is not to see if each of them works correctly as a separate unit (it is impractical , because the amount of mocking requires a separate framework of its own - often custom made for one project only) , the goal it to test the user interface as one system (logical separated by functionality, just to give some order to the mess) in order to provide to the team and to the customer that the system which is built provides requested functionality.
This is accomplished by using automated unit testing frameworks. One that I especially like is Watin, an open source project under active development which allows any developer to programmatically test the user interface of any web application inside Firefox and Internet Explorer (which we are the two browser mostly tested by web developers).
Watin is a good framework. Of course there is place for improvement, by what is accomplished now is very useful in enterprise strength projects. For anyone who has developed with javascript using this framework will be easy and will come naturally.
I would recommend it for everyone doing serious web development in any environment and with any tools.
Oznake:
.NET,
ASP.NET,
Watin,
Web Development
20 November 2008
Designing proper HTML code
I think there is a need to engineer HTML code in a web web application, the same way server side and client side code is engineered. I'm posing my self the question how?
For standard programming languages I use UML, but UML can't be applied to HTML. Html denotes the structure of a hyper text it doesn't model interactions or functions. It can't be effectively described with standard software engineering techniques.
HTML code is simple, and short and anybody can learn to do it in one hour. It would seem to the causal user that HTML doesn't need to be specially engineered. I think that is not the case. Every web application is always finally rendered into HTML. All user interactions are defined by how the page is structured in HTML, the way the server side code is structured depends on the way HTML is structured and the ease CSS can be developed also depends on the way HTML is structured. Not to mention cross browser and cross platform portability.
It really matters if a developer uses tables withing tables, or a series of stacked divs. It really meters the decision between table cells and unsorted lists or paragraphs. When put in perspective, most problems I've encountered in my career as a web developer had to do in a way with badly engineered HTML.
I think it is critical to find a way to design and plan markup code for web applications. If we as engineers spend so many hours a day preparing or code and our applications to be of the maximum quality, I think it is imperative to spend the same energy on HTML.
I know what you think. HTML is not serious, it is for kids not engineers. But look around you. Web applications are everywhere, and so it is HTML. Without HTML there would not be the world wide web as we know it. Its simplicity is what it drove web applications inside and outside the corporate firewalls. And neglect to properly engineer HTML code is one of the root causes of the poor qualty many web applications suffer.
It just came to me today, this idea. I spent several days designing several objects in UML, documenting them, writing them, testing them, writing and thinking about unit test, automating them, and it all worked as a charm. But when it got down to HTML and its sister cousin CSS I worked as newb coding like hell without preparing out a head, doing a crap job on a critical part of the application I'm working on. I can't put it there like that. I have to rewrite it tomorrow to increase the quality of the code I'm producing. But how many hours of work would I saved if I engineered my HTML code in the same way I engineered my javascript and C# code?
For standard programming languages I use UML, but UML can't be applied to HTML. Html denotes the structure of a hyper text it doesn't model interactions or functions. It can't be effectively described with standard software engineering techniques.
HTML code is simple, and short and anybody can learn to do it in one hour. It would seem to the causal user that HTML doesn't need to be specially engineered. I think that is not the case. Every web application is always finally rendered into HTML. All user interactions are defined by how the page is structured in HTML, the way the server side code is structured depends on the way HTML is structured and the ease CSS can be developed also depends on the way HTML is structured. Not to mention cross browser and cross platform portability.
It really matters if a developer uses tables withing tables, or a series of stacked divs. It really meters the decision between table cells and unsorted lists or paragraphs. When put in perspective, most problems I've encountered in my career as a web developer had to do in a way with badly engineered HTML.
I think it is critical to find a way to design and plan markup code for web applications. If we as engineers spend so many hours a day preparing or code and our applications to be of the maximum quality, I think it is imperative to spend the same energy on HTML.
I know what you think. HTML is not serious, it is for kids not engineers. But look around you. Web applications are everywhere, and so it is HTML. Without HTML there would not be the world wide web as we know it. Its simplicity is what it drove web applications inside and outside the corporate firewalls. And neglect to properly engineer HTML code is one of the root causes of the poor qualty many web applications suffer.
It just came to me today, this idea. I spent several days designing several objects in UML, documenting them, writing them, testing them, writing and thinking about unit test, automating them, and it all worked as a charm. But when it got down to HTML and its sister cousin CSS I worked as newb coding like hell without preparing out a head, doing a crap job on a critical part of the application I'm working on. I can't put it there like that. I have to rewrite it tomorrow to increase the quality of the code I'm producing. But how many hours of work would I saved if I engineered my HTML code in the same way I engineered my javascript and C# code?
03 November 2008
Learning the devils way : killing the interest first
I grow tired of the endless stream of SQL going into my head on daily bases. It all looks the same, but with subtle differences. I'm just no so interested to learn what different flavors of create table exist out there. But I must. But I so needed to advance my self career wise.
So I soldier on. Learning T-SQL every day, one hour a day. My personal learning time. And during my project time I'm learning PL/SQL. Of course my project time doesn't allow me much time to learn all that I need about the damned Oracle SQL dialect, so I learn during my break, during my free time at home in the evenings experimenting on the Oracle 10g EX database I've installed on my Ubuntu machine for just that purpose.
But it tires me so. I would rather learn Jquery or Dojo, or read some new PHP book (like PHP in Action from Manning), or continue my studies of Django or learn a new cool language like Erlang or OCaml. But not. I'm stuck with T-SQL and PL/SQL. It is my choice. One that I had to make.
So I soldier on. Learning T-SQL every day, one hour a day. My personal learning time. And during my project time I'm learning PL/SQL. Of course my project time doesn't allow me much time to learn all that I need about the damned Oracle SQL dialect, so I learn during my break, during my free time at home in the evenings experimenting on the Oracle 10g EX database I've installed on my Ubuntu machine for just that purpose.
But it tires me so. I would rather learn Jquery or Dojo, or read some new PHP book (like PHP in Action from Manning), or continue my studies of Django or learn a new cool language like Erlang or OCaml. But not. I'm stuck with T-SQL and PL/SQL. It is my choice. One that I had to make.
29 October 2008
I have a bloody dream of software never written by a sane head
I have a couple of ideas. Development wise. Something I want to do on the side on my free time usually spent not being with my family but watching stupid tv shows and movies in order to free my mai9nd from all day developing in some stupid, soon to replace programming languages. But I digress.
I had several ideas today:
1. Writing an unit testing framework fro stored procedures in MySQL, written in MySQL for MySQl. I don't think those exists. And I think they are needed for the all continuous integration thingy. and I think uit would be an interesting idea to implement it. If , ever, I'm going to do that I'm going to open source it and host it on Google Code. Way cool idea, I must say. I'm impressed with my self.
2. Writing a microblogging service bus that will connect to other microblogging services of interest pool their data and present disperses them as a part of their aggregate feed.
Here it is how I envisioned it. It would be php based on REST. So simple pot and GET request. no fancy WSDL. XMl would be used to send data over the web each service bus will host data and provide service for one personal microblog (which would be accessed through a client, separately written in whichever technology I or someone chooses). Now the owner of the microblog would in theory register to someone else's microfeed, and pool their data as well as his whenever a microblog feed would be requested by a client (obviously mine and theirs feed would be differentiated). Each microblog would also post a service with commonly used words to link to a cluster of relate microposts, and a service listing other microblogs aggregating feeds from this blog.

3. For my next laptop which I will buy in a couple of years I'm going for a pure virtual platform. Here is what I want. A laptop with a fresh, fast , stable and lite linux install with VirtualBox or something better installed. And then several virtual machine , with various configurations(I may need to run several on the same time) , each used for a separate purpose - testing, development, home use, art... etc. Neat. I just can't wait for 2010 to come. Thats the year I'm going probably to get my new laptop. Maybe. If I'm lucky. Really lucky.
On the personal note, my son who just turned eleven months old and I barely see during the week started walking by him self. So no longer hand holding. No boy he is a home missile bent on general havoc and destruction. I love the little dynamo.
I work for nine hours a day, minimum, and drive for two hours plus one hour for waking up and doing morning stuff nobody needs to know. So I'm gone for twelve hours each day during the bloody week. And that my friends takes a toll, on me on may family on everybody. And of course when I get home I'm next to useless.
I had several ideas today:
1. Writing an unit testing framework fro stored procedures in MySQL, written in MySQL for MySQl. I don't think those exists. And I think they are needed for the all continuous integration thingy. and I think uit would be an interesting idea to implement it. If , ever, I'm going to do that I'm going to open source it and host it on Google Code. Way cool idea, I must say. I'm impressed with my self.
2. Writing a microblogging service bus that will connect to other microblogging services of interest pool their data and present disperses them as a part of their aggregate feed.
Here it is how I envisioned it. It would be php based on REST. So simple pot and GET request. no fancy WSDL. XMl would be used to send data over the web each service bus will host data and provide service for one personal microblog (which would be accessed through a client, separately written in whichever technology I or someone chooses). Now the owner of the microblog would in theory register to someone else's microfeed, and pool their data as well as his whenever a microblog feed would be requested by a client (obviously mine and theirs feed would be differentiated). Each microblog would also post a service with commonly used words to link to a cluster of relate microposts, and a service listing other microblogs aggregating feeds from this blog.

3. For my next laptop which I will buy in a couple of years I'm going for a pure virtual platform. Here is what I want. A laptop with a fresh, fast , stable and lite linux install with VirtualBox or something better installed. And then several virtual machine , with various configurations(I may need to run several on the same time) , each used for a separate purpose - testing, development, home use, art... etc. Neat. I just can't wait for 2010 to come. Thats the year I'm going probably to get my new laptop. Maybe. If I'm lucky. Really lucky.
On the personal note, my son who just turned eleven months old and I barely see during the week started walking by him self. So no longer hand holding. No boy he is a home missile bent on general havoc and destruction. I love the little dynamo.
I work for nine hours a day, minimum, and drive for two hours plus one hour for waking up and doing morning stuff nobody needs to know. So I'm gone for twelve hours each day during the bloody week. And that my friends takes a toll, on me on may family on everybody. And of course when I get home I'm next to useless.
25 October 2008
Oracle , stored procedures and table statements
I drive for two hours every day to go to and from the work. In my car I hav an mp3 player and I spend those hours listening to trade podcasts. Mostly .NET rocks, FLOSS weekly and Stack Overflow. There are others , but they are not currently worth mentioning. I heard in one episode of .NET rocks that the internet is killing the software printing industry. They said that less and less people have time to read and study a book on any topic for several months before starting to work with the technology they were studying. Now, everybody uses Google.
Developers usually open their IDE, or editor, read some tutorials and then start coding. When they hit a problem they google the solution for it. Nobody reads. Nobody has the time to learn a technology that will change inside a year. I guess is true. Thats how I started doing it. Learning by googling. And really, I think thats the wrong way to do it.
See, here is my rationale. You can acomplish lots of thing by doing that. But I guarantee that you wont do it right, You are bound to miss some fundamental things. Or you are going to use the wrong solution for the problem you are facing. All things which would be easily avoided if you've taken time to learn a technology properly.
But thats not possible. You have so much to learn, so many possibilites. It is not possible to learn them throughly. It would take you all your working day to just keep up with all of that, I wish I could. But I can't.
What I do is pick a technology, buy a book or two and separate one hour a day, each working day to learn it chapter by chapter. These are technologies I like or think will be critical for my work for a longer period of time. Like SQL Server, or ASP.NET.
Now things will come that will require of me to learn something new just for one project. The technology in question may be extensive, but I don't have the time and the energy to learn it properly. In those cases I resort to Google to be my guide.
And thats what happened with stored procedures and Oracle. See, I'm kinda the db guy for my team. So for our latest project I got stuck doing database work besides my regular web work, Our client uses an Oracle database. We planned several stored procedures to handle all data transactions between the client and the database. Now, I haven't ever worked with Oracle and PL/SQL. And the project was way under way , so I didn't have much time to learn PL/SQL. So I started googling.
My first task was to create two procedures which would create some new tables and destroy them respectively. Some alter table statements were thrown in the mix.
Now , the first problem was that I couldn't do CREATE AND ALTER TABLE statements inside a stored procedure. I had to use EXECUTE IMMEDIATE, which runs all sorts of queries inside the stored procedure.
Now the following problem was that the created stored procedures couldn't create tables becuase my user couldn't explicitly do that . My user , which was handed to me by the client, received its permissions through roles. In order for a stored procedure created by my user to be able to create tables and so , my user must have the CREATE TABLE privilege granted to it specific.
Here is the code:
GRANT CREATE TABLE TO UserName;
CREATE STORED PROCEDURE TestProc
AS
BEGIN
EXECUTE IMMEDIATE 'CREATE TABLE TestTable (name VARCHAR2 NULL)';
END;
It took me two whole days to do that. Fantastic. One site that helped me a lot was this.
Developers usually open their IDE, or editor, read some tutorials and then start coding. When they hit a problem they google the solution for it. Nobody reads. Nobody has the time to learn a technology that will change inside a year. I guess is true. Thats how I started doing it. Learning by googling. And really, I think thats the wrong way to do it.
See, here is my rationale. You can acomplish lots of thing by doing that. But I guarantee that you wont do it right, You are bound to miss some fundamental things. Or you are going to use the wrong solution for the problem you are facing. All things which would be easily avoided if you've taken time to learn a technology properly.
But thats not possible. You have so much to learn, so many possibilites. It is not possible to learn them throughly. It would take you all your working day to just keep up with all of that, I wish I could. But I can't.
What I do is pick a technology, buy a book or two and separate one hour a day, each working day to learn it chapter by chapter. These are technologies I like or think will be critical for my work for a longer period of time. Like SQL Server, or ASP.NET.
Now things will come that will require of me to learn something new just for one project. The technology in question may be extensive, but I don't have the time and the energy to learn it properly. In those cases I resort to Google to be my guide.
And thats what happened with stored procedures and Oracle. See, I'm kinda the db guy for my team. So for our latest project I got stuck doing database work besides my regular web work, Our client uses an Oracle database. We planned several stored procedures to handle all data transactions between the client and the database. Now, I haven't ever worked with Oracle and PL/SQL. And the project was way under way , so I didn't have much time to learn PL/SQL. So I started googling.
My first task was to create two procedures which would create some new tables and destroy them respectively. Some alter table statements were thrown in the mix.
Now , the first problem was that I couldn't do CREATE AND ALTER TABLE statements inside a stored procedure. I had to use EXECUTE IMMEDIATE, which runs all sorts of queries inside the stored procedure.
Now the following problem was that the created stored procedures couldn't create tables becuase my user couldn't explicitly do that . My user , which was handed to me by the client, received its permissions through roles. In order for a stored procedure created by my user to be able to create tables and so , my user must have the CREATE TABLE privilege granted to it specific.
Here is the code:
GRANT CREATE TABLE TO UserName;
CREATE STORED PROCEDURE TestProc
AS
BEGIN
EXECUTE IMMEDIATE 'CREATE TABLE TestTable (name VARCHAR2 NULL)';
END;
It took me two whole days to do that. Fantastic. One site that helped me a lot was this.
Subscribe to:
Posts (Atom)