by

A safer code

During my professional career up to now, I had the chance to work with all sorts of developers. From the reasonable to the excellent ones; and talking with some colleagues this week about that fact I have to say, it does not matter how bad or good they were I must say in every case I learnt something good with them. And one thing specially was common in all the cases: how to write a more secure code.

Which brings me to another point of discussion: how do you measure yourself as a code-writer? do you think you are a good coder? What makes you such a good developer? How do you approach a problem before you start coding?

And when I stop to think about the last sentence I remember an article I read about making your code safer and a concept I've learned reading the book "Decline and fall of the American programmer" from Edward Yourdon : The silver bullet. Basically the silver bullet is the only thing that can kill a werewolf, portrayed as a software bug or a business problem, and unfortunately just like this mythical creature there is no silver bullet for the real life issues we face everyday. There is no 'exact and single' solution for our problems.

So, to make you code safer is literally up to you. Nobody else, therefore excluding the programming language you use. Just because you are using C# it does not means it will be a better product than if you were using Visual Basic 6. OK, it will save you development and release time but just the language won't make your product better or your code safer. Again, only the developer can predict and treat the vulnerabilities.

And because of this we go to another layer of the development cycle: The design. A better and safer design can do much more for the final product than the language used to develop it. Safer products are a result from safer designs and good code practices.

It does not matter how good the product is. Once it is released, it can be attacked. No, that's not a sad destiny. As a matter of fact, as a good developer you must find this absolutely normal and expected. I write code with this in mind. Everyday. And even thou the clients tell me: "this is only going to be used within our department", I still do not change my mind. It can lead to a little bit longer development time, yes, but the gains in security and stability in the application are far greater.

So, I do not worry about the securities holes the application might have in a future because the application will run in a new platform and I should have done "this" instead of "that". Again: I accept the fact the application one day will be attacked. My biggest concern here is: How my code will behave when it gets attacked?

So, spend the time you want in improving your code. We should be proud of our coding skills just like a father is proud of his offspring.

And we know sometimes the parents can be blind about their sons skills and abilities. To avoid this pitfall with your code, ask someone senior to review your code. Meet someone who really knows what's he is talking about and ask him to review your work.

If this person is really good, I have two words of advice for you: Be humble and prepare yourself. Asking someone to review your work can be an amazing learning experience about yourself and the way you see the problems.

Remember what I mentioned: you always can learn something new, from the good and from the not so good. This is a big lesson from life to those who have an open mind to learn.

By

by

Fix Visual Studio 2005 Slow Start

Microsoft Visual Studio 2005

If you are, like me, a heavy user of Microsoft Visual Studio 2005, chances are that you have experienced at some point a very slow application start. Once my visual studio 2005 was taking about 30 seconds just to load the interface.

After some good research, I could find a very interesting point: my visual studio was referencing a solution that I haven't worked in the last 8 months. Going deep on this, I saw this registry key:
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\ProjectMRUList (MRU stands for "Most Recently Used")
If you have never touched this key via any regedit application, chances are that it is holding the last 20 projects you worked using VS 2005, and it does not matter how many are listed in your MRU list in your "File menu".

Why does Visual Studio 2005 saves the last 20 projects even thou I choose to save only the last 5 ones is still a a mistery.

So, happens that some of the solutions in my list were pointing to remote drives that I do not access anymore, thus creating this delay when loading Visual Studio.

To fix that I simply deleted the values for this key and it is all good now.

By

by

What is Marketing ?

iPod marketing share

Dear friends, today Apple released to the market the brand new iPod. Speaking of business, the iPod is such a extraordinary creation that no one could see it coming a few year ago and reaching the levels they are today and its relevance in the world market. The iPod created a brand new market for itself, and its market share is just amazing. To have an iPod today is to have status. Apple really did it, again.

But not always was like that. So let me tell you a story.


---- --- -- -
The year was 1997. Steve Jobs, who was previously fired from the company he created with a friend, was called back to Apple with a mission to rescue the company from the certain death. Once he got there, one of the first things he did, he fired the company who used to produce Apple's marketing campaigns and immediately put up Apple's marketing account up for grabs.


Mr. Jon Steel, owner of one of the agencies crazy to get such a big client, remember the exact moment when he met Jobs. According to his words, it was something like that:


"Me and my partner were almost 2 hours inside this huge meeting room with 2 others Apple's executives. Then Jobs came in. He literally broke the amazingly boring presentation we were watching. Those 2 guys were doing a presentation about Apple's history, profile, the "win-win" ideology, the key factors for success inside the company, Apple's vast portfolio, investment plans, yada yada yada.

Jobs briefly greeted us and then came straight away, without even turning his head towards the actual Apple's executives. He said:
- I am 100% sure this beautiful talk that you guys just heard from the "dynamic duo" here is all crap. So, here is the deal: The Apple is about to break. We are going for bankruptcy! but I believe that if we can make 2 or 3 things very well done, things with world class appeal, we will manage our way out of this. During the last days I rejected 11 projects that were presented to me, only 2 were left: called G4 and iMac. For me, they are the ONLY projects capable to represent what we want this company to become: Technologically superb, visually fantastic. And I will bet Apple's future on them.


We left the meeting with all the ideas from Jobs himself. A few days later, we got the news that the "dynamic duo" had been fired later that same day.”
---- --- -- -
Well, my point is. What is marketing for you? Let's call this case the "Marketing 1.0". Until mid-90s, that was the kind of marketing that trashed companies around the world, with those companies mission statements, with empty messages, boring...but very well formatted. Nowadays, this marketing does not deserve any of our attention anymore.


Sometimes I think some "marketing people" are trying to make a "cartel", a "gang". This gang would be made of their cool-other-marketing-creative-friends-from-other-companies, they create large campaigns based on repetition-repetition-repetition-repetition of the same campaigns of the past, just because there is a saying in this niche: You have to publish 10 times the same campaign, so the client will pay attention to the message. Just like those crazy rug sellers on the TV screaming every 0.5 seconds the prices out loud, treating us at home as deaf or blind consumers.


I say, that's rubbish! We can do better than this! They MUST do better than this!

That's why the Marketing 2.0 is coming powerful in the Internet age. Now, you can see very funny, creative, innovative campaigns from the Internet itself. And guess who created them? teenagers, retired people, even people who never worked with marketing before. The media revolution gave them power so other can see and tell: Hey, those guys are really cool! And they never went to those marketing schools to learn those same-same marketing laws.

Right now, the main problem of the Marketing 2.0 is the ROI, or the lack of it. It still does not have metrics, it still does not give us better "leads" for new businesses, they still do not have a strategy to align the field vendors and the employees using several communication pipes online and offline.
And that's going to be just a matter of time, and then one day those guys and this new marketing era will be able to predict entire product forecasts and compose projects budgets with efficiency. And in a new way!

The marketing 1.0 will be dead then; and with it, those who were not able to pick up the pace.

If you are a marketeer, and you like your job, think about it. What would Jobs tell about you in your next PowerPoint presentation? Would he interrupt you ? Would he support you?

And then, comes the Demand 2.0.


We should concentrate our business efforts in the clients, but those with the highest chances to turn from formal proposals to real contracts. To real money. Use the marketing 2.0 to collect, Analise the market and then create customized approaches. Now, speak clearly what is the BEST reason why this client would want to make business with you or to buy your product. When talking to the bosses, be straight, be business-oriented, goal-oriented. Stop selling only for your regular buyer.

Discover what does the client wants, what other problems they have. Attack them! Now share those ideas with those who can help to find a solution. Which bring another point: surround yourself of good people. good soldiers. DON'T LET THEM GO to another company.


Transform your website in a portal that educates the visitor about how you can help them, what solutions do you have, what problems can you solve. Place there you most successful cases. Make a blog. Let others now that your company is a good one for work, in an open-shared environment where ideas flow.


Start selling your product before the client is ready to buy!

Yes, the end of the Marketing 1.0 is near and it is coming. Throw away the old myths, open space for the new. The Marketing 2.0 is right here, right now.


Let's share ideas. I can share mine with you as well. If you don't share, how would we exchange and grow? if not here, where? if not now, when?

Think about it. See you guys later.

By

by

The Risk

Last night I had a conversation with some new friends here in the Beautiful Australia and I would like to share something with you guys to reflect upon:

"Those people you see, on the National Geographic or Discovery Chanel, who try to reach the top of the Everest, are they crazy or what ?"

Now, picture this. For many decades, many men and women have tried... and there, they lost their lives. As a matter of fact, most of these people were not even able to return to their loved ones. Despite this tragic statistic, more and more people tried... risking... knowing that they probably will die during this journey, leaving family, children, wives behind.

So, why they still did/do this ? Because it was worth it doing it. In the very risk, a transformation happens in you, something is born inside you. No other experience can give you this. It only can be developed in the risk. That's the beauty of risk.

So, here we are, talking about the idea of "live your live to the most", no regrets, no looking back.

Then another question arise: "Can you remember when did you feel most alive?"

For some, it was when they managed to speak a second language for first time, for others was when they first did bungie-jumping in New Zealand or Switzerland, for others was when their first child was born.

Now, if you remember "your special moment", I bet a shiver will run through your spine and your heartbeat increase. If I ask you to describe this feeling, you will be talking about this moment, proud of yourself and about how cool was it.

I can almost tell a pattern where people will :

- Talk about a scenario in which the risk pushed themselves out of their comfort zone and;
- The outcome of the risk is not the main goal, instead the journey is what they remember most and;
- They finish the story with a big smile and sparkling eyes.


So, there it goes. Think again about that first question I mentioned. Now, my idea is that the beauty of the risk doesn't lie in the final result - it lies in who you become in the process. Confident. Engaged. Alive. I risk to say more: this is not something you do every summer
- it becomes a habit, and it can be contagious. It gives you a new approach to life. After doing it, your life is just not the same anymore, otherwise you will feel stagnant, bored.

So, just like that famous question:"when was the last time you did something for the first time?"

See you all later!

By

by

Start Slow: TFS and Team System

Lately I have been talking a lot with my colleagues about the TFS and the Visual Studio Team System.

Even thou these are very cool ground breaking technologies, I must say that they are no silver-bullets.

Companies who does not implement the right processes for software development life cycle, will get little gain from implementing them accross their teams.

I can say without doubt that if your company uses the Microsoft Solutions Framework (MSF) methodologies as a base, that's a very good indicator; if not, please before using TFS or TS, try to engage your team on this philosofy.

visual studio 2005 team system screenTeam System is a very expensive package, and it is not like Microsoft Office, that you just install and then let the people using it. If you plan to use Team System, one advice: Start small. Start by using TFS as a version-control and take advantage of work-item tracking. Now it is a good time to leave behind those cheap-file-system-based solutions like SourceSafe and CVS. They were good, at their moments, but now time times are different, we are talking of a world-class solution.


I have never heard of a full implementation of Team System in one shot . I can only imagine that if this happen, they would fire-fight the integration of so many variables and softwares and tools, and probably will learn that very simple truth: Team System is just too big. There is just too much to learn and execute at the same time. I even risk saying that at the end it will be a very big frustration... and waste of time...and of course, money.

So, by trying first the work-item tracking, everyone can see right away something called: traceability; also code metrics and better team communication. These are only baby steps, but at least in the right direction.

Once the work-item tracking is done, do this: implement unit testing. Start small, don't be affraid, start using basic unit testing, not the whole Test-Driven Development methodology. Remember, right now we only want to kick-off our environment, so no rush. Another point, is that TDD is a highly complex practice, not only a bunch of monkeys tryping crazy stuff to test and validade the cycle, so the learning curve can be very steep. Just by implementing Unit testing you will already improve the code quality in a matter of days.

The next step is to write unit tests to validade a requirement. Oh...Don't you have requirements? in this case, return to basics...MSF.

This is another benefit that you will have in a immediate way — you will for sure understand how to meet your requirements. Why? simple, because if you can't write an unit test for requirements, then the requirement isn't testable. The unit testing tools in Team Edition for Software Testers will quilify these are "poor quality items", and we do not want to deliver poor solutions, do we?

new microsoft visual studio 2008 codename Orcas screenshot

Now, just like you read email, or drink coffe, or do a little break at 3PM for a chat with colleagues, do this: perform unit testing. everyday. There is a method called continuous integration which is perform the tests against the code before it is checked in. If this is ask too much, at least make sure to check in a buildable version of your software. That's the minimum you can do for your colleagues, and for yourself. Guarentee that the latest version is not breaking.

The reason for that is called nightly builds. Every night, a build will be performed by Team System, and it will catch all the errors during this process. So play this game, try to catch the error before TS. Chances are you won't, but again you will improve your software testing culture. At the end of the day, is way cheaper catch bugs in development than after releases.

Another good thing about nightly builds is that, after each build you will have access to a report of build metrics. That's a very extensive report about your code. How many lines of code, method counts, how many unused variables, how many changesets per build. That's history data, and in a few months you can clearly identify what pieces of code are the most critical in your solution...chances are that you will be surprised to know that a small validating method in some business logic layer is just too overloaded with calls and responsability.

Even the nightly build is a big turn. So, try run the nightly builds per assembly, for a start...then add others with the time, if all goes well and you are getting used to the methodology.

Well, here they are: TFS, work-items, unit testing, nightly builds...And just for you to know, Microsoft Best Practices says to implement Team System new features every 3 months. So, again, no rush.
Good Luck!

By

by

A few ways to recognize your employeers work

Here goes a few ideas about how to recognize your employees works and that probably will help you to make the office space a better place to live:
  • For your new employee, on his first day at work, put on his desk some chocolates and a written letter:"Welcome to our team!"
  • Give your employees a sign or plate with their name to place on his desk or hang outside his door. It makes a bid difference!
  • Try to pin point and understand EXACTLY what motivates you to work.
  • Give a "Pizza Party" at your department. This can happen in the last day of the month, during somebody's birthday or simply because you are hungry and want to celebrate a Friday.
  • Read letters from satisfied customers in front of everyone, share with them your accomplishments.
  • Create 'goals' and distribute them away with a message: "Dinner for 2 for those who make it happen".
  • Talk regularly with every single employee, but let each one of them in charge of scheduling the date. Give them this responsibility and look like they are calling you for meeting.

By

by

The 300 Role Model

"Surrender, we are many, you are few. We won't lay down our weapons, you want them? Come get them! The Persians arrows will blot out the sun. Better this way, we will fight in the shadow."

The movie ‘300’ is like a big punch in the stomach, and you have no time to fall. In '300', you see a comic book story that meets the entrepreneurship that meets the world history.

‘300’ is about the legendary battle of Thermopylae where, on the year of 480 BC, 300 Spartans fought against millions of Persians for the future of Greece. Nobody knows exactly how many were really involved in the war; but everyone agreed: It was few against many!

Based on Frank Miller's graphic novel, the movie in its first week generated USD 70 millions in USA alone, with no Tom Cruise, Brad Pitt or a big-shot Hollywood star; instead the major roles were a Scottish called Gerard Butler as King Leonidas and a Brazilian called Rodrigo Santoro as King Xerxes.

Some might say that people go to see this movie because it shows sexy naked women, rock music, violence and amazing special effects.

That's a lie!

This movie captures the audience because it is about the eternal battle between the strong and the weak, between heroes and villains, between common people and powerful kings. This movie attracts people because every single one wants to know how to defeat a much powerful competitor when we have only too few resources; how to conquer the market when we have few people; how to make more out of few.

‘300’ is a bloody battle between a little small company carried on the shoulders of very talented warriors committed by the honor and a huge corporation machine maintained by millions of regular employees who, some of them, do not even know what are they doing in the company or why they are doing that.

‘300’ offers much more than insights for your professional life than many MBA courses around there. Save yourself USD 500, watch the movie for a few dollars. You will learn a lesson about the leader that inspired others (even to admire him until his last breath), you will learn about how to start a company where everyone wants to work on 24x7 (until their last moments), to create a brand, a history, a legend (that will overcome the death).

When the captain decides to punish the soldier, Leonidas - Spartan King - teaches the manager the value of respect towards the lower ranks. When in doubt of his own convictions, Leonidas asks his partner’s opinion, wife, and Queen - who always is treated equally as any other man - about how to deal with the business. When busy, just a few days before facing millions and certain death, he find himself quality time to spend with his little son and teach him the secrets of the business world that he knows so well. When ready for battle, tie, computer and mobile, everything he does is to KEEP FOCUS ON THE REASON to make the best for the business and his employees. When King Xerxes, try to seduce Leonidas with the benefits of a possible merge & acquisition of the little Spartan company by the mega-corporation Persia will bring to the shareholders, for him (by becoming CEO of Greece, palaces, women, higher salaries) and for his employees (who will set themselves free from slavery), Leonidas reminds Xerxes that the true slavery of the human being it is not the economical slavery or social, but is to lose the Spartan life style, their culture, their philosophy and the right to take decisions freely without need to justify to nobody.

In every scene, you can learn something about you! Forget the popcorn and the soft drinks, concentrate on the dialogues.

When the Spartan board of directors decides to surrender to Xerxes, by not supporting Leonidas, they take the army command out from Leonidas, and tell him to kneel and behold the invisible; Leonidas instead, he does a spin-off in the army, creates himself his own company, he gathers 300 of his best soldiers and go to war against Xerxes' millions. When he is asked about how he will defeat millions with just 300 soldiers he says he will use his brain when Xerxes uses his ego. He moves towards Thermopylae, a narrow passage where it will neutralize the enemy superiority in numbers.

When an incapable and mediocre Spartan asks him to join the army, Leonidas tells him to go home; in the other hand, Xerxes is sending his mediocre to the front to die first. In Leonidas' small company, only the best, the braves and the brilliants are accepted. He left out the weak, the average, and the non-team players. Interesting, he brings all the married men with at least one son, meaning these are the most committed people when compared against young and singles.

He does not want anybody to slow down his bests and show weakness to the enemy. He can not afford it. During a very important moment of the battle, Leonidas meets Xerxes, the God-King asks: "How do you envision defeating me? I would kill anyone of my own men just to have you killed"; "I would die for anyone of my own men" Leonidas says.

When Leonidas notices that he will not be able anymore to defeat Xerxes' army, he decides to build a brand!!! He sends just one of your soldiers back home with a mission to make sure everyone knows about of what happened there and the history and glory of those 300 Spartans will live forever.

2.500 years later, in the other side of the planet, we are here talking about those 300 warriors. "The whole world will know that a handful of free men fought to their death against the tyranny, the whole world will know that few stand against many."

The marketing started by Leonidas worked. This viral inspired millions of Spartans, and produced the necessary proud to unite the Greek world, who later ended the Persian invasion and never defeated Greece. And because of that, a new regime was being born, the Democracy.

The Spartan society left nothing behind except the histories of his battles. No art, no knowledge, no invention, no technology to enlighten the path...but they left the unconditional dedication and the strong discipline of his people to become the best warriors of the world as legacy.

Sparta did not produced an Einstein, a Michelangelo, or a Leonardo da Vinci, but they gave birth to the expression "Spartan Life", that is today related to the lifestyle where a person give up privileges and personal benefits to embrace (with body, mind and soul) and surrender his life to a higher cause.

Is that enough for you or you want more?

By