- Clean Architecture by Robert Martin
- Embrace the Uncertainty by Dan North
- Git and GitHub for Developers on Windows by Phil Haack
- You are in production, now what? by Tatham Oddie
Saturday, June 16, 2012
NDC 2012
The 2012 Norwegian Developer Conference takes place in Oslo 6th - 8th June in Oslo Spectrum. Amende has a stand in the venue and along with it comes a few passes which us employees can share. I signed up to go on Thursday because there was a couple of talks that really interests me. Other obvious reason for picking Thursday may include the party of music and alcohol follows the day, but I was honestly too tired to join as my brain was going through indigestion from the amount of information and ideas absorbed during the day.
This is actually my first NDC or any .NET developer conference for that matter since I was a java developer in my early days, Java Zone was a more natural destination for me, I was there in 2008.
Talks in the NDC varies, some may be presentation of a new idea, others maybe a cool project that they work on, there are even some workshops to present some cool features in a common technology.
The talks I went to are
Sunday, May 13, 2012
IT Consulting, the choice of technology
Once upon a time I referred to the technology I mastered as "weapons", that I would use to kill bugs. That was the time when I called myself a "bugslayer" and my satisfaction was to eliminate bugs. That was before I took a step back and see the whole picture.
Fast forward a couple of years and I have met my mentor/friend who recommended a book to me, "The Passionate Programmer" by Chad Fowler. In the book (Part 1) he compared technology to "stocks" and compared spending time to master a technology to spending money to buy stock. With stock investing as a hobby, this idea sat really well with me and have since then influenced my choice of technology to master.
In traditional stock market, there are blue chip stocks that represent the big, established companies. They won't go bankrupt tomorrow, but they won't double in price tomorrow either. People buy these stocks for their stable return. In the IT world, blue chip technology would be like Java and C#, by mastering these languages, you have the key to a big part of the IT job market, there are thousands of jobs available, but at the same time there are also thousands of professional with the same background. So the salary won't be great, but one should have no problem making a living.
Then there are the small companies (The penny stocks), they represent the small companies which the price may shoot up to the sky the next day or may as well disappear from the market the next day. Investment in these stocks consist of high risk but at the same time the return can be phenomenal. In the IT world, we have technologies such as small talk, rubies on rail, or other less popular programming languages or technologies that not many people know, but at the same time there are also few jobs asking for these skills. However, when a company is desperate for such a skill, and you happen to be the only one knocking on their door, you will be in a very good bargaining position. On the other side, if the demand of the technology dies down, then all the time you have spent on aquiring the knowledge would be wasted.
Stocks in the IPO could sometimes be a good investment, and so is a new technology. The first ones to master the new technology is usually well on their way to enjoy the payoff while others are still learning. However, while we cheer for the andriod developers, we must not forget the poor symbian developers.
So what technologies should we spend our time on? Like the good old investment advice: "Don't put all your eggs in one basket." Everyone should have a "portfolio" consisting of serveral technologies that belong to each categories. Do the homework, follow the trend closely and watch for signs of a market change. Don't be afraid of make a switch when the market has changed. As for myself, I started off as a Java developer, but then I realized that C# is more popular in the Norwegian market than Java so I made the switch. As I have gotten comfortable with C#, I have added Microsoft BI into my portfolio and now I am able to enjoy the boom in ETL projects while I can always go back to traditional programming should it become less popular in the future.
So whenever I meet a student and they ask me for advice as for what technology they should focus on, I tell them this story above, and recommend them to read the book as well.
Fast forward a couple of years and I have met my mentor/friend who recommended a book to me, "The Passionate Programmer" by Chad Fowler. In the book (Part 1) he compared technology to "stocks" and compared spending time to master a technology to spending money to buy stock. With stock investing as a hobby, this idea sat really well with me and have since then influenced my choice of technology to master.
In traditional stock market, there are blue chip stocks that represent the big, established companies. They won't go bankrupt tomorrow, but they won't double in price tomorrow either. People buy these stocks for their stable return. In the IT world, blue chip technology would be like Java and C#, by mastering these languages, you have the key to a big part of the IT job market, there are thousands of jobs available, but at the same time there are also thousands of professional with the same background. So the salary won't be great, but one should have no problem making a living.
Then there are the small companies (The penny stocks), they represent the small companies which the price may shoot up to the sky the next day or may as well disappear from the market the next day. Investment in these stocks consist of high risk but at the same time the return can be phenomenal. In the IT world, we have technologies such as small talk, rubies on rail, or other less popular programming languages or technologies that not many people know, but at the same time there are also few jobs asking for these skills. However, when a company is desperate for such a skill, and you happen to be the only one knocking on their door, you will be in a very good bargaining position. On the other side, if the demand of the technology dies down, then all the time you have spent on aquiring the knowledge would be wasted.
Stocks in the IPO could sometimes be a good investment, and so is a new technology. The first ones to master the new technology is usually well on their way to enjoy the payoff while others are still learning. However, while we cheer for the andriod developers, we must not forget the poor symbian developers.
So what technologies should we spend our time on? Like the good old investment advice: "Don't put all your eggs in one basket." Everyone should have a "portfolio" consisting of serveral technologies that belong to each categories. Do the homework, follow the trend closely and watch for signs of a market change. Don't be afraid of make a switch when the market has changed. As for myself, I started off as a Java developer, but then I realized that C# is more popular in the Norwegian market than Java so I made the switch. As I have gotten comfortable with C#, I have added Microsoft BI into my portfolio and now I am able to enjoy the boom in ETL projects while I can always go back to traditional programming should it become less popular in the future.
So whenever I meet a student and they ask me for advice as for what technology they should focus on, I tell them this story above, and recommend them to read the book as well.
Monday, February 13, 2012
Difference between a developer and a consultant
I recall a few years back while I was still working towards my degree of Computer Science and Engineering, without a superior GPA and without a clear path of a career, I seeked advice from an older friend who had been in the working world for a few years. His answer was quite straight forward, "Go be a consultant." he said. Without too much knowledge in the consulting world, and with my mindset of being a software developer, I quickly brushed off the advice.
Recently I recalled this conversation out of the blue and by that time I was an IT Consultant having worked in the field for 5 years already, and I am enjoying it.
So what is a difference between a developer and a consultant?
In short, developers solve a technological challenge, while an IT consultant solves a business challenge using technlogy.
During my career I have worked with developers and consultants, sometimes even worked with consultants who really should have been a developer or vice versa. I think the biggest difference lies in the following points.
Understanding of the subject knowledge:
Most technologies works independent of industry, one can make a website with .NET MVC for an online store or for a stock exchange broker. So as a developer working for Microsoft to come out with a technology (in this case MVC) which helps web developers to make a website, not much subject knowledge is required.
However, as a consultant who sits with an online store owner trying to figure out what features should be included in the online store, subject knowledge would be necessary. A basic understanding of the business, customers, would be needed in order to design a website that suits the need of the client. The subject knowledge is not always required, but if a picky client is paying for a consultant to get things done, they are looking for exactly this.
Communication skills requirement
A developer usually works in-house and is in charge of code. Most often they report to the lead developer or the software architect. No matter if it is a lead developer or software architect, their understanding of technology subject is usually higher than the developer himself and thus a developer rarely have to worry about the word choice, the technology specific terms will be understood.
Consultants usually works at the client site and often needs to communicate with the client regarding needs and wants. Most often the client is a businessman who doesn't have a clue how technology works. So it would be a bad idea to start bringing in terms like SQL, .NET, Dependency Injection etc. because to a businessman these terms are as familiary as greek. (No offence to Greece, but that's what I was told in my early years.)
Ability to bargain and be political
Developers gets a task list and the list needs to be completed by a certain deadline and usually that's the end of the story. It is not because there are no politics, but simply those are handled by people higher up in the heiarchy. A developer simply have to strive on making the best software, one that is robust, fast, and is flexible to additional features in the future.
Consultants often faces challenges outside of technology. For example, a budget constraint or a strategic decision which doesn't allow the consultant to implement the solution with the desired technology or method. Furthermore, the classical argument of what is a change request vs a bug also require a lot of energy/effort.
Summary:
The line between consultant and developer is getting blurry and thus it is more difficult to split between them. I am writing this to point out a few key difference so that students or job hunters can self-analyze thier strength and weaknesses in order to choose the job that fits them better.
Recently I recalled this conversation out of the blue and by that time I was an IT Consultant having worked in the field for 5 years already, and I am enjoying it.
So what is a difference between a developer and a consultant?
In short, developers solve a technological challenge, while an IT consultant solves a business challenge using technlogy.
During my career I have worked with developers and consultants, sometimes even worked with consultants who really should have been a developer or vice versa. I think the biggest difference lies in the following points.
Understanding of the subject knowledge:
Most technologies works independent of industry, one can make a website with .NET MVC for an online store or for a stock exchange broker. So as a developer working for Microsoft to come out with a technology (in this case MVC) which helps web developers to make a website, not much subject knowledge is required.
However, as a consultant who sits with an online store owner trying to figure out what features should be included in the online store, subject knowledge would be necessary. A basic understanding of the business, customers, would be needed in order to design a website that suits the need of the client. The subject knowledge is not always required, but if a picky client is paying for a consultant to get things done, they are looking for exactly this.
Communication skills requirement
A developer usually works in-house and is in charge of code. Most often they report to the lead developer or the software architect. No matter if it is a lead developer or software architect, their understanding of technology subject is usually higher than the developer himself and thus a developer rarely have to worry about the word choice, the technology specific terms will be understood.
Consultants usually works at the client site and often needs to communicate with the client regarding needs and wants. Most often the client is a businessman who doesn't have a clue how technology works. So it would be a bad idea to start bringing in terms like SQL, .NET, Dependency Injection etc. because to a businessman these terms are as familiary as greek. (No offence to Greece, but that's what I was told in my early years.)
Ability to bargain and be political
Developers gets a task list and the list needs to be completed by a certain deadline and usually that's the end of the story. It is not because there are no politics, but simply those are handled by people higher up in the heiarchy. A developer simply have to strive on making the best software, one that is robust, fast, and is flexible to additional features in the future.
Consultants often faces challenges outside of technology. For example, a budget constraint or a strategic decision which doesn't allow the consultant to implement the solution with the desired technology or method. Furthermore, the classical argument of what is a change request vs a bug also require a lot of energy/effort.
Summary:
The line between consultant and developer is getting blurry and thus it is more difficult to split between them. I am writing this to point out a few key difference so that students or job hunters can self-analyze thier strength and weaknesses in order to choose the job that fits them better.
Sunday, September 11, 2011
Recursive query with CTE
This is my first time writing a technical blogpost. Any comments are welcome.
CTE, Common Table Expressions can be considered to be a temporary table within a query (commonly used in a stored procedure or a function), one advantage of it is that it can refer to itself and thus makes recursive query possible.
example:
with SalesAmountByCustomer as
(
Select
CustomerID,
sum(SalesAmount) as SalesAmount
From
CustomerSales
Group By
CustomerID
)
Select
CustomerName,
SalesAmount
From
Customer
Join SalesAmountByCustomer on Customer.CustomerID = SalesAmountByCustomer.CustomerID
Order By
CustomerName
For those who understand the concept of recursion, there is always a base condition, and a parameter which the function takes and manipulate. While the base condition is not met, it will repeatedly call itself with the manipulated parameter and the function will keep manipulate the parameter until the base condition is met.
CTE acts the same way.
A CTE recursive query has the following structure:
with "CTE Name" as
(
"select statement that represent the first call"
Union ALL
"select statment which refers to the CTE, usually a join with the CTE itself"
)
The second part will eventually return no result (just like a recursive function will eventually have its base condition met).
Practical example:
Suppose we have an employee table that looks like this:
And to find out Cyclops superior and his/her superior and so forth, one can write the following query:
with Sup as
(
SELECT EmployeeID, Name, SuperiorID FROM Employee WHERE name = 'Cyclops'
UNION ALL
SELECT E.EmployeeID, E.Name, E.SuperiorID FROM Employee E JOIN Sup on Sup.SuperiorID = E.EmployeeID
)
Select Name from Sup
Another thing I did with recursive CTE was to generate a "Heirarchy" view for a dropdown list in my SSRS report.
Using the above table as example, the query would then become like this:
with list as
(
Select
cast(Name as varchar(max)) as Heirarchy,
'-' as Spacing,
EmployeeID,
Name,
SuperiorID
From
Employee
Where
Name = 'Professor X'
Union All
Select
cast(Parent.Heirarchy + Child.Name as varchar(max)) Heirarchy,
cast(' '+Parent.Spacing as varchar(max)) Spacing,
Child.EmployeeID,
Child.Name,
Child.SuperiorID
From
List as Parent
Join Employee as Child on Child.SuperiorID = Parent.EmployeeID
)
Select
Spacing + Name EmployeeName,
From
List
Order By
Heirarchy
The above code will produce the following result:
-Professor X
-Storm
-Wolverine
-Cyclops
CTE, Common Table Expressions can be considered to be a temporary table within a query (commonly used in a stored procedure or a function), one advantage of it is that it can refer to itself and thus makes recursive query possible.
example:
with SalesAmountByCustomer as
(
Select
CustomerID,
sum(SalesAmount) as SalesAmount
From
CustomerSales
Group By
CustomerID
)
Select
CustomerName,
SalesAmount
From
Customer
Join SalesAmountByCustomer on Customer.CustomerID = SalesAmountByCustomer.CustomerID
Order By
CustomerName
For those who understand the concept of recursion, there is always a base condition, and a parameter which the function takes and manipulate. While the base condition is not met, it will repeatedly call itself with the manipulated parameter and the function will keep manipulate the parameter until the base condition is met.
CTE acts the same way.
A CTE recursive query has the following structure:
with "CTE Name" as
(
"select statement that represent the first call"
Union ALL
"select statment which refers to the CTE, usually a join with the CTE itself"
)
The second part will eventually return no result (just like a recursive function will eventually have its base condition met).
Practical example:
Suppose we have an employee table that looks like this:
EmployeeID | Username | Name | SuperiorID |
1 | x1234 | Professor X | null |
2 | s1234 | Storm | 1 |
3 | w1234 | Wolverine | 1 |
4 | c1234 | Cyclops | 3 |
And to find out Cyclops superior and his/her superior and so forth, one can write the following query:
with Sup as
(
SELECT EmployeeID, Name, SuperiorID FROM Employee WHERE name = 'Cyclops'
UNION ALL
SELECT E.EmployeeID, E.Name, E.SuperiorID FROM Employee E JOIN Sup on Sup.SuperiorID = E.EmployeeID
)
Select Name from Sup
Another thing I did with recursive CTE was to generate a "Heirarchy" view for a dropdown list in my SSRS report.
Using the above table as example, the query would then become like this:
with list as
(
Select
cast(Name as varchar(max)) as Heirarchy,
'-' as Spacing,
EmployeeID,
Name,
SuperiorID
From
Employee
Where
Name = 'Professor X'
Union All
Select
cast(Parent.Heirarchy + Child.Name as varchar(max)) Heirarchy,
cast(' '+Parent.Spacing as varchar(max)) Spacing,
Child.EmployeeID,
Child.Name,
Child.SuperiorID
From
List as Parent
Join Employee as Child on Child.SuperiorID = Parent.EmployeeID
)
Select
Spacing + Name EmployeeName,
From
List
Order By
Heirarchy
The above code will produce the following result:
-Professor X
-Storm
-Wolverine
-Cyclops
Subscribe to:
Posts (Atom)